PresenceWave External API

Assets

getAssets

List assets

Retrieve a paginated list of the assets in your workspace, newest first


/external/v1/assets

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "https://app.presencewave.com/external/v1/assets?type=type_example&page=56&size=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssetsApi;

import java.io.File;
import java.util.*;

public class AssetsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AssetsApi apiInstance = new AssetsApi();
        String type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

        Integer page = 56; // Integer | Page number (0-based)
        Integer size = 56; // Integer | Number of items per page (max 100)

        try {
            getAssets_200_response result = apiInstance.getAssets(type, page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#getAssets");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String type = new String(); // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

final Integer page = new Integer(); // Integer | Page number (0-based)
final Integer size = new Integer(); // Integer | Number of items per page (max 100)

try {
    final result = await api_instance.getAssets(type, page, size);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getAssets: $e\n');
}

import org.openapitools.client.api.AssetsApi;

public class AssetsApiExample {
    public static void main(String[] args) {
        AssetsApi apiInstance = new AssetsApi();
        String type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

        Integer page = 56; // Integer | Page number (0-based)
        Integer size = 56; // Integer | Number of items per page (max 100)

        try {
            getAssets_200_response result = apiInstance.getAssets(type, page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#getAssets");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AssetsApi *apiInstance = [[AssetsApi alloc] init];
String *type = type_example; // File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
 (optional) (default to all)
Integer *page = 56; // Page number (0-based) (optional) (default to 0)
Integer *size = 56; // Number of items per page (max 100) (optional) (default to 20)

// List assets
[apiInstance getAssetsWith:type
    page:page
    size:size
              completionHandler: ^(getAssets_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.AssetsApi()
var opts = {
  'type': type_example, // {String} File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

  'page': 56, // {Integer} Page number (0-based)
  'size': 56 // {Integer} Number of items per page (max 100)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAssets(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getAssetsExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AssetsApi();
            var type = type_example;  // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
 (optional)  (default to all)
            var page = 56;  // Integer | Page number (0-based) (optional)  (default to 0)
            var size = 56;  // Integer | Number of items per page (max 100) (optional)  (default to 20)

            try {
                // List assets
                getAssets_200_response result = apiInstance.getAssets(type, page, size);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AssetsApi.getAssets: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssetsApi();
$type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

$page = 56; // Integer | Page number (0-based)
$size = 56; // Integer | Number of items per page (max 100)

try {
    $result = $api_instance->getAssets($type, $page, $size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssetsApi->getAssets: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssetsApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssetsApi->new();
my $type = type_example; # String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

my $page = 56; # Integer | Page number (0-based)
my $size = 56; # Integer | Number of items per page (max 100)

eval {
    my $result = $api_instance->getAssets(type => $type, page => $page, size => $size);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssetsApi->getAssets: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AssetsApi()
type = type_example # String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
 (optional) (default to all)
page = 56 # Integer | Page number (0-based) (optional) (default to 0)
size = 56 # Integer | Number of items per page (max 100) (optional) (default to 20)

try:
    # List assets
    api_response = api_instance.get_assets(type=type, page=page, size=size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->getAssets: %s\n" % e)
extern crate AssetsApi;

pub fn main() {
    let type = type_example; // String
    let page = 56; // Integer
    let size = 56; // Integer

    let mut context = AssetsApi::Context::default();
    let result = client.getAssets(type, page, size, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
type
String
File-type filter. `document` covers PDF, Word, Excel, text and presentation files; `other` is everything that is neither an image nor a document.
page
Integer
Page number (0-based)
size
Integer
Number of items per page (max 100)

Responses


searchAssets

Search assets

Search the assets in your workspace by file name or description. The match is case-insensitive and can be anywhere in the text. Results are paginated, newest first.


/external/v1/assets/search

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "https://app.presencewave.com/external/v1/assets/search?q=logo&type=type_example&page=56&size=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssetsApi;

import java.io.File;
import java.util.*;

public class AssetsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AssetsApi apiInstance = new AssetsApi();
        String q = logo; // String | Text to look for in the file name or description. Empty returns all assets.
        String type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

        Integer page = 56; // Integer | Page number (0-based)
        Integer size = 56; // Integer | Number of items per page (max 100)

        try {
            getAssets_200_response result = apiInstance.searchAssets(q, type, page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#searchAssets");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String q = new String(); // String | Text to look for in the file name or description. Empty returns all assets.
final String type = new String(); // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

final Integer page = new Integer(); // Integer | Page number (0-based)
final Integer size = new Integer(); // Integer | Number of items per page (max 100)

try {
    final result = await api_instance.searchAssets(q, type, page, size);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->searchAssets: $e\n');
}

import org.openapitools.client.api.AssetsApi;

public class AssetsApiExample {
    public static void main(String[] args) {
        AssetsApi apiInstance = new AssetsApi();
        String q = logo; // String | Text to look for in the file name or description. Empty returns all assets.
        String type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

        Integer page = 56; // Integer | Page number (0-based)
        Integer size = 56; // Integer | Number of items per page (max 100)

        try {
            getAssets_200_response result = apiInstance.searchAssets(q, type, page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#searchAssets");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AssetsApi *apiInstance = [[AssetsApi alloc] init];
String *q = logo; // Text to look for in the file name or description. Empty returns all assets. (optional) (default to null)
String *type = type_example; // File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
 (optional) (default to all)
Integer *page = 56; // Page number (0-based) (optional) (default to 0)
Integer *size = 56; // Number of items per page (max 100) (optional) (default to 20)

// Search assets
[apiInstance searchAssetsWith:q
    type:type
    page:page
    size:size
              completionHandler: ^(getAssets_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.AssetsApi()
var opts = {
  'q': logo, // {String} Text to look for in the file name or description. Empty returns all assets.
  'type': type_example, // {String} File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

  'page': 56, // {Integer} Page number (0-based)
  'size': 56 // {Integer} Number of items per page (max 100)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchAssets(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class searchAssetsExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AssetsApi();
            var q = logo;  // String | Text to look for in the file name or description. Empty returns all assets. (optional)  (default to null)
            var type = type_example;  // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
 (optional)  (default to all)
            var page = 56;  // Integer | Page number (0-based) (optional)  (default to 0)
            var size = 56;  // Integer | Number of items per page (max 100) (optional)  (default to 20)

            try {
                // Search assets
                getAssets_200_response result = apiInstance.searchAssets(q, type, page, size);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AssetsApi.searchAssets: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssetsApi();
$q = logo; // String | Text to look for in the file name or description. Empty returns all assets.
$type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

$page = 56; // Integer | Page number (0-based)
$size = 56; // Integer | Number of items per page (max 100)

try {
    $result = $api_instance->searchAssets($q, $type, $page, $size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssetsApi->searchAssets: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssetsApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssetsApi->new();
my $q = logo; # String | Text to look for in the file name or description. Empty returns all assets.
my $type = type_example; # String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.

my $page = 56; # Integer | Page number (0-based)
my $size = 56; # Integer | Number of items per page (max 100)

eval {
    my $result = $api_instance->searchAssets(q => $q, type => $type, page => $page, size => $size);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssetsApi->searchAssets: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AssetsApi()
q = logo # String | Text to look for in the file name or description. Empty returns all assets. (optional) (default to null)
type = type_example # String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
 (optional) (default to all)
page = 56 # Integer | Page number (0-based) (optional) (default to 0)
size = 56 # Integer | Number of items per page (max 100) (optional) (default to 20)

try:
    # Search assets
    api_response = api_instance.search_assets(q=q, type=type, page=page, size=size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->searchAssets: %s\n" % e)
extern crate AssetsApi;

pub fn main() {
    let q = logo; // String
    let type = type_example; // String
    let page = 56; // Integer
    let size = 56; // Integer

    let mut context = AssetsApi::Context::default();
    let result = client.searchAssets(q, type, page, size, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
q
String
Text to look for in the file name or description. Empty returns all assets.
type
String
File-type filter. `document` covers PDF, Word, Excel, text and presentation files; `other` is everything that is neither an image nor a document.
page
Integer
Page number (0-based)
size
Integer
Number of items per page (max 100)

Responses


uploadAssets

Upload assets

Uploads one or more files as multipart form data. Send each file in a `files` field. By default a file is skipped when an asset with exactly the same file name, size and content type already exists in your workspace, so a whole folder can be re-sent safely. Skipped files are listed under `skipped` together with the existing asset. Set `allowDuplicates=true` to store every file regardless. The response is `201` when at least one file was stored and `409` when every file was a duplicate. A request is limited to 10MB in total, so send large folders in batches.


/external/v1/assets

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: multipart/form-data" \
 "https://app.presencewave.com/external/v1/assets?allowDuplicates=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssetsApi;

import java.io.File;
import java.util.*;

public class AssetsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AssetsApi apiInstance = new AssetsApi();
        array[File] files = /path/to/file.txt; // array[File] | One or more files to upload
        Boolean allowDuplicates = true; // Boolean | Store files even when an identical asset (same name, size and content type) already exists

        try {
            uploadAssets_201_response result = apiInstance.uploadAssets(files, allowDuplicates);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#uploadAssets");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final array[File] files = new array[File](); // array[File] | One or more files to upload
final Boolean allowDuplicates = new Boolean(); // Boolean | Store files even when an identical asset (same name, size and content type) already exists

try {
    final result = await api_instance.uploadAssets(files, allowDuplicates);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->uploadAssets: $e\n');
}

import org.openapitools.client.api.AssetsApi;

public class AssetsApiExample {
    public static void main(String[] args) {
        AssetsApi apiInstance = new AssetsApi();
        array[File] files = /path/to/file.txt; // array[File] | One or more files to upload
        Boolean allowDuplicates = true; // Boolean | Store files even when an identical asset (same name, size and content type) already exists

        try {
            uploadAssets_201_response result = apiInstance.uploadAssets(files, allowDuplicates);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#uploadAssets");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AssetsApi *apiInstance = [[AssetsApi alloc] init];
array[File] *files = /path/to/file.txt; // One or more files to upload (default to null)
Boolean *allowDuplicates = true; // Store files even when an identical asset (same name, size and content type) already exists (optional) (default to false)

// Upload assets
[apiInstance uploadAssetsWith:files
    allowDuplicates:allowDuplicates
              completionHandler: ^(uploadAssets_201_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.AssetsApi()
var files = /path/to/file.txt; // {array[File]} One or more files to upload
var opts = {
  'allowDuplicates': true // {Boolean} Store files even when an identical asset (same name, size and content type) already exists
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.uploadAssets(files, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class uploadAssetsExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AssetsApi();
            var files = new array[File](); // array[File] | One or more files to upload (default to null)
            var allowDuplicates = true;  // Boolean | Store files even when an identical asset (same name, size and content type) already exists (optional)  (default to false)

            try {
                // Upload assets
                uploadAssets_201_response result = apiInstance.uploadAssets(files, allowDuplicates);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AssetsApi.uploadAssets: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssetsApi();
$files = /path/to/file.txt; // array[File] | One or more files to upload
$allowDuplicates = true; // Boolean | Store files even when an identical asset (same name, size and content type) already exists

try {
    $result = $api_instance->uploadAssets($files, $allowDuplicates);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssetsApi->uploadAssets: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssetsApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssetsApi->new();
my $files = [/path/to/file.txt]; # array[File] | One or more files to upload
my $allowDuplicates = true; # Boolean | Store files even when an identical asset (same name, size and content type) already exists

eval {
    my $result = $api_instance->uploadAssets(files => $files, allowDuplicates => $allowDuplicates);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssetsApi->uploadAssets: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AssetsApi()
files = /path/to/file.txt # array[File] | One or more files to upload (default to null)
allowDuplicates = true # Boolean | Store files even when an identical asset (same name, size and content type) already exists (optional) (default to false)

try:
    # Upload assets
    api_response = api_instance.upload_assets(files, allowDuplicates=allowDuplicates)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->uploadAssets: %s\n" % e)
extern crate AssetsApi;

pub fn main() {
    let files = /path/to/file.txt; // array[File]
    let allowDuplicates = true; // Boolean

    let mut context = AssetsApi::Context::default();
    let result = client.uploadAssets(files, allowDuplicates, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Form parameters
Name Description
files*
array[File] (binary)
One or more files to upload
Required
Query parameters
Name Description
allowDuplicates
Boolean
Store files even when an identical asset (same name, size and content type) already exists

Responses


BlogPosts

createBlogPost

Create a blog post from Markdown

Converts the supplied Markdown content (CommonMark + GFM tables/strikethrough) to sanitized HTML and creates a new blog post on the specified blog. The blog must belong to the authenticated tenant.


/external/v1/blogs/{blogId}/posts

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://app.presencewave.com/external/v1/blogs/{blogId}/posts" \
 -d '{
  "scheduledPublishAt" : "2026-10-20T09:00:00+05:30",
  "featuredImageUrl" : "featuredImageUrl",
  "scheduledPublishTimezone" : "Asia/Kolkata",
  "markdownContent" : "## Introduction\n\nThis is **markdown** content.",
  "setPublish" : false,
  "title" : "How we launched our new product",
  "excerpt" : "excerpt",
  "category" : "Product Updates",
  "metaDescription" : "metaDescription",
  "tags" : [ "launch", "product" ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.BlogPostsApi;

import java.io.File;
import java.util.*;

public class BlogPostsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        BlogPostsApi apiInstance = new BlogPostsApi();
        Long blogId = 123; // Long | ID of the blog to create the post in
        CreateBlogPostRequest createBlogPostRequest = {"title":"How we launched our new product","markdownContent":"## Introduction\n\nThis is **markdown** content.","setPublish":false}; // CreateBlogPostRequest | 

        try {
            createBlogPost_201_response result = apiInstance.createBlogPost(blogId, createBlogPostRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BlogPostsApi#createBlogPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Long blogId = new Long(); // Long | ID of the blog to create the post in
final CreateBlogPostRequest createBlogPostRequest = new CreateBlogPostRequest(); // CreateBlogPostRequest | 

try {
    final result = await api_instance.createBlogPost(blogId, createBlogPostRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createBlogPost: $e\n');
}

import org.openapitools.client.api.BlogPostsApi;

public class BlogPostsApiExample {
    public static void main(String[] args) {
        BlogPostsApi apiInstance = new BlogPostsApi();
        Long blogId = 123; // Long | ID of the blog to create the post in
        CreateBlogPostRequest createBlogPostRequest = {"title":"How we launched our new product","markdownContent":"## Introduction\n\nThis is **markdown** content.","setPublish":false}; // CreateBlogPostRequest | 

        try {
            createBlogPost_201_response result = apiInstance.createBlogPost(blogId, createBlogPostRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BlogPostsApi#createBlogPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
BlogPostsApi *apiInstance = [[BlogPostsApi alloc] init];
Long *blogId = 123; // ID of the blog to create the post in (default to null)
CreateBlogPostRequest *createBlogPostRequest = {"title":"How we launched our new product","markdownContent":"## Introduction\n\nThis is **markdown** content.","setPublish":false}; // 

// Create a blog post from Markdown
[apiInstance createBlogPostWith:blogId
    createBlogPostRequest:createBlogPostRequest
              completionHandler: ^(createBlogPost_201_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.BlogPostsApi()
var blogId = 123; // {Long} ID of the blog to create the post in
var createBlogPostRequest = {"title":"How we launched our new product","markdownContent":"## Introduction\n\nThis is **markdown** content.","setPublish":false}; // {CreateBlogPostRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createBlogPost(blogId, createBlogPostRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createBlogPostExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new BlogPostsApi();
            var blogId = 123;  // Long | ID of the blog to create the post in (default to null)
            var createBlogPostRequest = new CreateBlogPostRequest(); // CreateBlogPostRequest | 

            try {
                // Create a blog post from Markdown
                createBlogPost_201_response result = apiInstance.createBlogPost(blogId, createBlogPostRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling BlogPostsApi.createBlogPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\BlogPostsApi();
$blogId = 123; // Long | ID of the blog to create the post in
$createBlogPostRequest = {"title":"How we launched our new product","markdownContent":"## Introduction\n\nThis is **markdown** content.","setPublish":false}; // CreateBlogPostRequest | 

try {
    $result = $api_instance->createBlogPost($blogId, $createBlogPostRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BlogPostsApi->createBlogPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::BlogPostsApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::BlogPostsApi->new();
my $blogId = 123; # Long | ID of the blog to create the post in
my $createBlogPostRequest = WWW::OPenAPIClient::Object::CreateBlogPostRequest->new(); # CreateBlogPostRequest | 

eval {
    my $result = $api_instance->createBlogPost(blogId => $blogId, createBlogPostRequest => $createBlogPostRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BlogPostsApi->createBlogPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.BlogPostsApi()
blogId = 123 # Long | ID of the blog to create the post in (default to null)
createBlogPostRequest = {"title":"How we launched our new product","markdownContent":"## Introduction\n\nThis is **markdown** content.","setPublish":false} # CreateBlogPostRequest | 

try:
    # Create a blog post from Markdown
    api_response = api_instance.create_blog_post(blogId, createBlogPostRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BlogPostsApi->createBlogPost: %s\n" % e)
extern crate BlogPostsApi;

pub fn main() {
    let blogId = 123; // Long
    let createBlogPostRequest = {"title":"How we launched our new product","markdownContent":"## Introduction\n\nThis is **markdown** content.","setPublish":false}; // CreateBlogPostRequest

    let mut context = BlogPostsApi::Context::default();
    let result = client.createBlogPost(blogId, createBlogPostRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
blogId*
Long (int64)
ID of the blog to create the post in
Required
Body parameters
Name Description
createBlogPostRequest *

Responses


MailingLists

getMailingLists

Get all mailing lists

Retrieve all mailing lists for the authenticated tenant


/external/v1/mailinglists

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "https://app.presencewave.com/external/v1/mailinglists"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MailingListsApi;

import java.io.File;
import java.util.*;

public class MailingListsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MailingListsApi apiInstance = new MailingListsApi();

        try {
            getMailingLists_200_response result = apiInstance.getMailingLists();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MailingListsApi#getMailingLists");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getMailingLists();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getMailingLists: $e\n');
}

import org.openapitools.client.api.MailingListsApi;

public class MailingListsApiExample {
    public static void main(String[] args) {
        MailingListsApi apiInstance = new MailingListsApi();

        try {
            getMailingLists_200_response result = apiInstance.getMailingLists();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MailingListsApi#getMailingLists");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MailingListsApi *apiInstance = [[MailingListsApi alloc] init];

// Get all mailing lists
[apiInstance getMailingListsWithCompletionHandler: 
              ^(getMailingLists_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.MailingListsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMailingLists(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getMailingListsExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MailingListsApi();

            try {
                // Get all mailing lists
                getMailingLists_200_response result = apiInstance.getMailingLists();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling MailingListsApi.getMailingLists: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MailingListsApi();

try {
    $result = $api_instance->getMailingLists();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailingListsApi->getMailingLists: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MailingListsApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MailingListsApi->new();

eval {
    my $result = $api_instance->getMailingLists();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MailingListsApi->getMailingLists: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MailingListsApi()

try:
    # Get all mailing lists
    api_response = api_instance.get_mailing_lists()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MailingListsApi->getMailingLists: %s\n" % e)
extern crate MailingListsApi;

pub fn main() {

    let mut context = MailingListsApi::Context::default();
    let result = client.getMailingLists(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


ShortURLs

createShortUrl

Create a short URL

Create a new short URL in the specified URL shortener. The URL shortener must belong to the authenticated tenant. If `customCode` is omitted, a random code is generated.


/external/v1/urlshorteners/{urlShortenerId}/shortUrls

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://app.presencewave.com/external/v1/urlshorteners/{urlShortenerId}/shortUrls" \
 -d '{
  "destinationUrl" : "https://www.example.com/very/long/url/that/needs/shortening",
  "customCode" : "my-link"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ShortURLsApi;

import java.io.File;
import java.util.*;

public class ShortURLsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        ShortURLsApi apiInstance = new ShortURLsApi();
        String urlShortenerId = 896026019052372722; // String | ID of the URL shortener
        CreateShortUrlRequest createShortUrlRequest = {"destinationUrl":"https://www.example.com/very/long/url/that/needs/shortening","customCode":"my-link"}; // CreateShortUrlRequest | 

        try {
            createShortUrl_201_response result = apiInstance.createShortUrl(urlShortenerId, createShortUrlRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShortURLsApi#createShortUrl");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String urlShortenerId = new String(); // String | ID of the URL shortener
final CreateShortUrlRequest createShortUrlRequest = new CreateShortUrlRequest(); // CreateShortUrlRequest | 

try {
    final result = await api_instance.createShortUrl(urlShortenerId, createShortUrlRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createShortUrl: $e\n');
}

import org.openapitools.client.api.ShortURLsApi;

public class ShortURLsApiExample {
    public static void main(String[] args) {
        ShortURLsApi apiInstance = new ShortURLsApi();
        String urlShortenerId = 896026019052372722; // String | ID of the URL shortener
        CreateShortUrlRequest createShortUrlRequest = {"destinationUrl":"https://www.example.com/very/long/url/that/needs/shortening","customCode":"my-link"}; // CreateShortUrlRequest | 

        try {
            createShortUrl_201_response result = apiInstance.createShortUrl(urlShortenerId, createShortUrlRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShortURLsApi#createShortUrl");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
ShortURLsApi *apiInstance = [[ShortURLsApi alloc] init];
String *urlShortenerId = 896026019052372722; // ID of the URL shortener (default to null)
CreateShortUrlRequest *createShortUrlRequest = {"destinationUrl":"https://www.example.com/very/long/url/that/needs/shortening","customCode":"my-link"}; // 

// Create a short URL
[apiInstance createShortUrlWith:urlShortenerId
    createShortUrlRequest:createShortUrlRequest
              completionHandler: ^(createShortUrl_201_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.ShortURLsApi()
var urlShortenerId = 896026019052372722; // {String} ID of the URL shortener
var createShortUrlRequest = {"destinationUrl":"https://www.example.com/very/long/url/that/needs/shortening","customCode":"my-link"}; // {CreateShortUrlRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createShortUrl(urlShortenerId, createShortUrlRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createShortUrlExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ShortURLsApi();
            var urlShortenerId = 896026019052372722;  // String | ID of the URL shortener (default to null)
            var createShortUrlRequest = new CreateShortUrlRequest(); // CreateShortUrlRequest | 

            try {
                // Create a short URL
                createShortUrl_201_response result = apiInstance.createShortUrl(urlShortenerId, createShortUrlRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ShortURLsApi.createShortUrl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ShortURLsApi();
$urlShortenerId = 896026019052372722; // String | ID of the URL shortener
$createShortUrlRequest = {"destinationUrl":"https://www.example.com/very/long/url/that/needs/shortening","customCode":"my-link"}; // CreateShortUrlRequest | 

try {
    $result = $api_instance->createShortUrl($urlShortenerId, $createShortUrlRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShortURLsApi->createShortUrl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ShortURLsApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ShortURLsApi->new();
my $urlShortenerId = 896026019052372722; # String | ID of the URL shortener
my $createShortUrlRequest = WWW::OPenAPIClient::Object::CreateShortUrlRequest->new(); # CreateShortUrlRequest | 

eval {
    my $result = $api_instance->createShortUrl(urlShortenerId => $urlShortenerId, createShortUrlRequest => $createShortUrlRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ShortURLsApi->createShortUrl: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.ShortURLsApi()
urlShortenerId = 896026019052372722 # String | ID of the URL shortener (default to null)
createShortUrlRequest = {"destinationUrl":"https://www.example.com/very/long/url/that/needs/shortening","customCode":"my-link"} # CreateShortUrlRequest | 

try:
    # Create a short URL
    api_response = api_instance.create_short_url(urlShortenerId, createShortUrlRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ShortURLsApi->createShortUrl: %s\n" % e)
extern crate ShortURLsApi;

pub fn main() {
    let urlShortenerId = 896026019052372722; // String
    let createShortUrlRequest = {"destinationUrl":"https://www.example.com/very/long/url/that/needs/shortening","customCode":"my-link"}; // CreateShortUrlRequest

    let mut context = ShortURLsApi::Context::default();
    let result = client.createShortUrl(urlShortenerId, createShortUrlRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
urlShortenerId*
String
ID of the URL shortener
Required
Body parameters
Name Description
createShortUrlRequest *

Responses


getShortUrls

Get short URLs

Retrieve the short URLs of a specific URL shortener, one page at a time. The response is a plain list without totals; an empty list means there are no more pages.


/external/v1/urlshorteners/{urlShortenerId}/shortUrls

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "https://app.presencewave.com/external/v1/urlshorteners/{urlShortenerId}/shortUrls?page=56&size=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ShortURLsApi;

import java.io.File;
import java.util.*;

public class ShortURLsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        ShortURLsApi apiInstance = new ShortURLsApi();
        String urlShortenerId = 896026019052372722; // String | ID of the URL shortener
        Integer page = 56; // Integer | Page number (0-based)
        Integer size = 56; // Integer | Number of items per page (max 100)

        try {
            getShortUrls_200_response result = apiInstance.getShortUrls(urlShortenerId, page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShortURLsApi#getShortUrls");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String urlShortenerId = new String(); // String | ID of the URL shortener
final Integer page = new Integer(); // Integer | Page number (0-based)
final Integer size = new Integer(); // Integer | Number of items per page (max 100)

try {
    final result = await api_instance.getShortUrls(urlShortenerId, page, size);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getShortUrls: $e\n');
}

import org.openapitools.client.api.ShortURLsApi;

public class ShortURLsApiExample {
    public static void main(String[] args) {
        ShortURLsApi apiInstance = new ShortURLsApi();
        String urlShortenerId = 896026019052372722; // String | ID of the URL shortener
        Integer page = 56; // Integer | Page number (0-based)
        Integer size = 56; // Integer | Number of items per page (max 100)

        try {
            getShortUrls_200_response result = apiInstance.getShortUrls(urlShortenerId, page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShortURLsApi#getShortUrls");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
ShortURLsApi *apiInstance = [[ShortURLsApi alloc] init];
String *urlShortenerId = 896026019052372722; // ID of the URL shortener (default to null)
Integer *page = 56; // Page number (0-based) (optional) (default to 0)
Integer *size = 56; // Number of items per page (max 100) (optional) (default to 20)

// Get short URLs
[apiInstance getShortUrlsWith:urlShortenerId
    page:page
    size:size
              completionHandler: ^(getShortUrls_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.ShortURLsApi()
var urlShortenerId = 896026019052372722; // {String} ID of the URL shortener
var opts = {
  'page': 56, // {Integer} Page number (0-based)
  'size': 56 // {Integer} Number of items per page (max 100)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getShortUrls(urlShortenerId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getShortUrlsExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ShortURLsApi();
            var urlShortenerId = 896026019052372722;  // String | ID of the URL shortener (default to null)
            var page = 56;  // Integer | Page number (0-based) (optional)  (default to 0)
            var size = 56;  // Integer | Number of items per page (max 100) (optional)  (default to 20)

            try {
                // Get short URLs
                getShortUrls_200_response result = apiInstance.getShortUrls(urlShortenerId, page, size);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ShortURLsApi.getShortUrls: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ShortURLsApi();
$urlShortenerId = 896026019052372722; // String | ID of the URL shortener
$page = 56; // Integer | Page number (0-based)
$size = 56; // Integer | Number of items per page (max 100)

try {
    $result = $api_instance->getShortUrls($urlShortenerId, $page, $size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShortURLsApi->getShortUrls: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ShortURLsApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ShortURLsApi->new();
my $urlShortenerId = 896026019052372722; # String | ID of the URL shortener
my $page = 56; # Integer | Page number (0-based)
my $size = 56; # Integer | Number of items per page (max 100)

eval {
    my $result = $api_instance->getShortUrls(urlShortenerId => $urlShortenerId, page => $page, size => $size);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ShortURLsApi->getShortUrls: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.ShortURLsApi()
urlShortenerId = 896026019052372722 # String | ID of the URL shortener (default to null)
page = 56 # Integer | Page number (0-based) (optional) (default to 0)
size = 56 # Integer | Number of items per page (max 100) (optional) (default to 20)

try:
    # Get short URLs
    api_response = api_instance.get_short_urls(urlShortenerId, page=page, size=size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ShortURLsApi->getShortUrls: %s\n" % e)
extern crate ShortURLsApi;

pub fn main() {
    let urlShortenerId = 896026019052372722; // String
    let page = 56; // Integer
    let size = 56; // Integer

    let mut context = ShortURLsApi::Context::default();
    let result = client.getShortUrls(urlShortenerId, page, size, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
urlShortenerId*
String
ID of the URL shortener
Required
Query parameters
Name Description
page
Integer
Page number (0-based)
size
Integer
Number of items per page (max 100)

Responses


Subscribers

addSubscriber

Add a new subscriber

Add a subscriber to the specified mailing list. The mailing list must belong to the authenticated tenant. Subscribers added through the API are confirmed immediately and do not receive a confirmation email.


/external/v1/mailinglists/{mailingListId}/subscribers

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://app.presencewave.com/external/v1/mailinglists/{mailingListId}/subscribers" \
 -d '{
  "name" : "John Doe",
  "email" : "user@example.com"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SubscribersApi;

import java.io.File;
import java.util.*;

public class SubscribersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SubscribersApi apiInstance = new SubscribersApi();
        String mailingListId = 897349163470943223; // String | ID of the mailing list
        AddSubscriberRequest addSubscriberRequest = {"email":"user@example.com","name":"John Doe"}; // AddSubscriberRequest | 

        try {
            addSubscriber_201_response result = apiInstance.addSubscriber(mailingListId, addSubscriberRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SubscribersApi#addSubscriber");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String mailingListId = new String(); // String | ID of the mailing list
final AddSubscriberRequest addSubscriberRequest = new AddSubscriberRequest(); // AddSubscriberRequest | 

try {
    final result = await api_instance.addSubscriber(mailingListId, addSubscriberRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->addSubscriber: $e\n');
}

import org.openapitools.client.api.SubscribersApi;

public class SubscribersApiExample {
    public static void main(String[] args) {
        SubscribersApi apiInstance = new SubscribersApi();
        String mailingListId = 897349163470943223; // String | ID of the mailing list
        AddSubscriberRequest addSubscriberRequest = {"email":"user@example.com","name":"John Doe"}; // AddSubscriberRequest | 

        try {
            addSubscriber_201_response result = apiInstance.addSubscriber(mailingListId, addSubscriberRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SubscribersApi#addSubscriber");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SubscribersApi *apiInstance = [[SubscribersApi alloc] init];
String *mailingListId = 897349163470943223; // ID of the mailing list (default to null)
AddSubscriberRequest *addSubscriberRequest = {"email":"user@example.com","name":"John Doe"}; // 

// Add a new subscriber
[apiInstance addSubscriberWith:mailingListId
    addSubscriberRequest:addSubscriberRequest
              completionHandler: ^(addSubscriber_201_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.SubscribersApi()
var mailingListId = 897349163470943223; // {String} ID of the mailing list
var addSubscriberRequest = {"email":"user@example.com","name":"John Doe"}; // {AddSubscriberRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addSubscriber(mailingListId, addSubscriberRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addSubscriberExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SubscribersApi();
            var mailingListId = 897349163470943223;  // String | ID of the mailing list (default to null)
            var addSubscriberRequest = new AddSubscriberRequest(); // AddSubscriberRequest | 

            try {
                // Add a new subscriber
                addSubscriber_201_response result = apiInstance.addSubscriber(mailingListId, addSubscriberRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SubscribersApi.addSubscriber: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SubscribersApi();
$mailingListId = 897349163470943223; // String | ID of the mailing list
$addSubscriberRequest = {"email":"user@example.com","name":"John Doe"}; // AddSubscriberRequest | 

try {
    $result = $api_instance->addSubscriber($mailingListId, $addSubscriberRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SubscribersApi->addSubscriber: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SubscribersApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SubscribersApi->new();
my $mailingListId = 897349163470943223; # String | ID of the mailing list
my $addSubscriberRequest = WWW::OPenAPIClient::Object::AddSubscriberRequest->new(); # AddSubscriberRequest | 

eval {
    my $result = $api_instance->addSubscriber(mailingListId => $mailingListId, addSubscriberRequest => $addSubscriberRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SubscribersApi->addSubscriber: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SubscribersApi()
mailingListId = 897349163470943223 # String | ID of the mailing list (default to null)
addSubscriberRequest = {"email":"user@example.com","name":"John Doe"} # AddSubscriberRequest | 

try:
    # Add a new subscriber
    api_response = api_instance.add_subscriber(mailingListId, addSubscriberRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SubscribersApi->addSubscriber: %s\n" % e)
extern crate SubscribersApi;

pub fn main() {
    let mailingListId = 897349163470943223; // String
    let addSubscriberRequest = {"email":"user@example.com","name":"John Doe"}; // AddSubscriberRequest

    let mut context = SubscribersApi::Context::default();
    let result = client.addSubscriber(mailingListId, addSubscriberRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
mailingListId*
String
ID of the mailing list
Required
Body parameters
Name Description
addSubscriberRequest *

Responses


getSubscribers

Get subscribers for a mailing list

Retrieve paginated list of subscribers for a specific mailing list


/external/v1/mailinglists/{mailingListId}/subscribers

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "https://app.presencewave.com/external/v1/mailinglists/{mailingListId}/subscribers?page=56&size=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SubscribersApi;

import java.io.File;
import java.util.*;

public class SubscribersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SubscribersApi apiInstance = new SubscribersApi();
        String mailingListId = 897349163470943223; // String | ID of the mailing list
        Integer page = 56; // Integer | Page number (0-based)
        Integer size = 56; // Integer | Number of items per page (max 100)

        try {
            getSubscribers_200_response result = apiInstance.getSubscribers(mailingListId, page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SubscribersApi#getSubscribers");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String mailingListId = new String(); // String | ID of the mailing list
final Integer page = new Integer(); // Integer | Page number (0-based)
final Integer size = new Integer(); // Integer | Number of items per page (max 100)

try {
    final result = await api_instance.getSubscribers(mailingListId, page, size);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getSubscribers: $e\n');
}

import org.openapitools.client.api.SubscribersApi;

public class SubscribersApiExample {
    public static void main(String[] args) {
        SubscribersApi apiInstance = new SubscribersApi();
        String mailingListId = 897349163470943223; // String | ID of the mailing list
        Integer page = 56; // Integer | Page number (0-based)
        Integer size = 56; // Integer | Number of items per page (max 100)

        try {
            getSubscribers_200_response result = apiInstance.getSubscribers(mailingListId, page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SubscribersApi#getSubscribers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SubscribersApi *apiInstance = [[SubscribersApi alloc] init];
String *mailingListId = 897349163470943223; // ID of the mailing list (default to null)
Integer *page = 56; // Page number (0-based) (optional) (default to 0)
Integer *size = 56; // Number of items per page (max 100) (optional) (default to 20)

// Get subscribers for a mailing list
[apiInstance getSubscribersWith:mailingListId
    page:page
    size:size
              completionHandler: ^(getSubscribers_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.SubscribersApi()
var mailingListId = 897349163470943223; // {String} ID of the mailing list
var opts = {
  'page': 56, // {Integer} Page number (0-based)
  'size': 56 // {Integer} Number of items per page (max 100)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSubscribers(mailingListId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getSubscribersExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SubscribersApi();
            var mailingListId = 897349163470943223;  // String | ID of the mailing list (default to null)
            var page = 56;  // Integer | Page number (0-based) (optional)  (default to 0)
            var size = 56;  // Integer | Number of items per page (max 100) (optional)  (default to 20)

            try {
                // Get subscribers for a mailing list
                getSubscribers_200_response result = apiInstance.getSubscribers(mailingListId, page, size);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SubscribersApi.getSubscribers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SubscribersApi();
$mailingListId = 897349163470943223; // String | ID of the mailing list
$page = 56; // Integer | Page number (0-based)
$size = 56; // Integer | Number of items per page (max 100)

try {
    $result = $api_instance->getSubscribers($mailingListId, $page, $size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SubscribersApi->getSubscribers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SubscribersApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SubscribersApi->new();
my $mailingListId = 897349163470943223; # String | ID of the mailing list
my $page = 56; # Integer | Page number (0-based)
my $size = 56; # Integer | Number of items per page (max 100)

eval {
    my $result = $api_instance->getSubscribers(mailingListId => $mailingListId, page => $page, size => $size);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SubscribersApi->getSubscribers: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SubscribersApi()
mailingListId = 897349163470943223 # String | ID of the mailing list (default to null)
page = 56 # Integer | Page number (0-based) (optional) (default to 0)
size = 56 # Integer | Number of items per page (max 100) (optional) (default to 20)

try:
    # Get subscribers for a mailing list
    api_response = api_instance.get_subscribers(mailingListId, page=page, size=size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SubscribersApi->getSubscribers: %s\n" % e)
extern crate SubscribersApi;

pub fn main() {
    let mailingListId = 897349163470943223; // String
    let page = 56; // Integer
    let size = 56; // Integer

    let mut context = SubscribersApi::Context::default();
    let result = client.getSubscribers(mailingListId, page, size, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
mailingListId*
String
ID of the mailing list
Required
Query parameters
Name Description
page
Integer
Page number (0-based)
size
Integer
Number of items per page (max 100)

Responses


removeSubscriber

Remove a subscriber

Remove a subscriber from this mailing list. The mailing list must belong to the authenticated tenant. Only a subscriber of this mailing list is removed: a subscriber ID that belongs to a different mailing list is left untouched. The call also reports success when no subscriber with that ID is on the list, so it is safe to repeat.


/external/v1/mailinglists/{mailingListId}/subscribers/{subscriberId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "https://app.presencewave.com/external/v1/mailinglists/{mailingListId}/subscribers/{subscriberId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SubscribersApi;

import java.io.File;
import java.util.*;

public class SubscribersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SubscribersApi apiInstance = new SubscribersApi();
        String mailingListId = 897349163470943223; // String | ID of the mailing list
        String subscriberId = 897349256844538805; // String | ID of the subscriber to remove

        try {
            ApiResponse result = apiInstance.removeSubscriber(mailingListId, subscriberId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SubscribersApi#removeSubscriber");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String mailingListId = new String(); // String | ID of the mailing list
final String subscriberId = new String(); // String | ID of the subscriber to remove

try {
    final result = await api_instance.removeSubscriber(mailingListId, subscriberId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->removeSubscriber: $e\n');
}

import org.openapitools.client.api.SubscribersApi;

public class SubscribersApiExample {
    public static void main(String[] args) {
        SubscribersApi apiInstance = new SubscribersApi();
        String mailingListId = 897349163470943223; // String | ID of the mailing list
        String subscriberId = 897349256844538805; // String | ID of the subscriber to remove

        try {
            ApiResponse result = apiInstance.removeSubscriber(mailingListId, subscriberId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SubscribersApi#removeSubscriber");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SubscribersApi *apiInstance = [[SubscribersApi alloc] init];
String *mailingListId = 897349163470943223; // ID of the mailing list (default to null)
String *subscriberId = 897349256844538805; // ID of the subscriber to remove (default to null)

// Remove a subscriber
[apiInstance removeSubscriberWith:mailingListId
    subscriberId:subscriberId
              completionHandler: ^(ApiResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.SubscribersApi()
var mailingListId = 897349163470943223; // {String} ID of the mailing list
var subscriberId = 897349256844538805; // {String} ID of the subscriber to remove

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeSubscriber(mailingListId, subscriberId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class removeSubscriberExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SubscribersApi();
            var mailingListId = 897349163470943223;  // String | ID of the mailing list (default to null)
            var subscriberId = 897349256844538805;  // String | ID of the subscriber to remove (default to null)

            try {
                // Remove a subscriber
                ApiResponse result = apiInstance.removeSubscriber(mailingListId, subscriberId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SubscribersApi.removeSubscriber: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SubscribersApi();
$mailingListId = 897349163470943223; // String | ID of the mailing list
$subscriberId = 897349256844538805; // String | ID of the subscriber to remove

try {
    $result = $api_instance->removeSubscriber($mailingListId, $subscriberId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SubscribersApi->removeSubscriber: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SubscribersApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SubscribersApi->new();
my $mailingListId = 897349163470943223; # String | ID of the mailing list
my $subscriberId = 897349256844538805; # String | ID of the subscriber to remove

eval {
    my $result = $api_instance->removeSubscriber(mailingListId => $mailingListId, subscriberId => $subscriberId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SubscribersApi->removeSubscriber: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SubscribersApi()
mailingListId = 897349163470943223 # String | ID of the mailing list (default to null)
subscriberId = 897349256844538805 # String | ID of the subscriber to remove (default to null)

try:
    # Remove a subscriber
    api_response = api_instance.remove_subscriber(mailingListId, subscriberId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SubscribersApi->removeSubscriber: %s\n" % e)
extern crate SubscribersApi;

pub fn main() {
    let mailingListId = 897349163470943223; // String
    let subscriberId = 897349256844538805; // String

    let mut context = SubscribersApi::Context::default();
    let result = client.removeSubscriber(mailingListId, subscriberId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
mailingListId*
String
ID of the mailing list
Required
subscriberId*
String
ID of the subscriber to remove
Required

Responses


URLShorteners

getUrlShorteners

Get all URL shorteners

Retrieve all URL shorteners for the authenticated tenant


/external/v1/urlshorteners

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "https://app.presencewave.com/external/v1/urlshorteners"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.URLShortenersApi;

import java.io.File;
import java.util.*;

public class URLShortenersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
        HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        URLShortenersApi apiInstance = new URLShortenersApi();

        try {
            getUrlShorteners_200_response result = apiInstance.getUrlShorteners();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLShortenersApi#getUrlShorteners");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getUrlShorteners();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getUrlShorteners: $e\n');
}

import org.openapitools.client.api.URLShortenersApi;

public class URLShortenersApiExample {
    public static void main(String[] args) {
        URLShortenersApi apiInstance = new URLShortenersApi();

        try {
            getUrlShorteners_200_response result = apiInstance.getUrlShorteners();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling URLShortenersApi#getUrlShorteners");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
URLShortenersApi *apiInstance = [[URLShortenersApi alloc] init];

// Get all URL shorteners
[apiInstance getUrlShortenersWithCompletionHandler: 
              ^(getUrlShorteners_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new PresenceWaveExternalApi.URLShortenersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUrlShorteners(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getUrlShortenersExample
    {
        public void main()
        {
            // Configure Bearer (opaque) access token for authorization: ApiKeyAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new URLShortenersApi();

            try {
                // Get all URL shorteners
                getUrlShorteners_200_response result = apiInstance.getUrlShorteners();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling URLShortenersApi.getUrlShorteners: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\URLShortenersApi();

try {
    $result = $api_instance->getUrlShorteners();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLShortenersApi->getUrlShorteners: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::URLShortenersApi;

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::URLShortenersApi->new();

eval {
    my $result = $api_instance->getUrlShorteners();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling URLShortenersApi->getUrlShorteners: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.URLShortenersApi()

try:
    # Get all URL shorteners
    api_response = api_instance.get_url_shorteners()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling URLShortenersApi->getUrlShorteners: %s\n" % e)
extern crate URLShortenersApi;

pub fn main() {

    let mut context = URLShortenersApi::Context::default();
    let result = client.getUrlShorteners(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses