Skip to contentSkip to navigationSkip to topbar
On this page

Marketplace API Migration Guide for publishers


(warning)

Migrate from Preview to v1

The Marketplace Preview API is deprecated. Migrate from Preview to v1 to ensure uninterrupted service.

The Marketplace v1 API replaces the Preview API and provides increased reliability for production environments. All Marketplace users and publishers should use v1.

This migration guide shows you how to migrate your calls from Preview to v1 and lists the Marketplace API resources that require migration.


How to migrate

how-to-migrate page anchor

To migrate from Preview to v1, update the base URL of your API calls.

For calls made using curl, update the base URL from https://preview.twilio.com/marketplace to https://marketplace.twilio.com/v1.

For calls made using the Twilio Helper Library, update the method from preview to marketplace. The specific change depends on the programming language used, as shown in the following migration example.

Migration example

migration-example page anchor

The following example shows how to migrate a call to the AvailableAddOns resource from Preview to v1.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listMarketplaceAvailableAddOn() {
11
const availableAddOns = await client.preview.marketplace.availableAddOns.list(
12
{ limit: 20 }
13
);
14
15
availableAddOns.forEach((a) => console.log(a.sid));
16
}
17
18
listMarketplaceAvailableAddOn();

To migrate to v1, update the base URL:

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listAvailableAddOn() {
11
const availableAddOns = await client.marketplace.v1.availableAddOns.list({
12
limit: 20,
13
});
14
15
availableAddOns.forEach((a) => console.log(a.sid));
16
}
17
18
listAvailableAddOn();

As a Publisher, you need to change the base URL for each API resource as follows:

  • Replace the Module resource from the Preview API with Listing Resource in v1. Update both the API base URL and resource name to migrate to v1. Refer to the Listing Resource documentation for more information and v1 examples.
    • Preview: https://preview.twilio.com/marketplace/Module/{{ModuleSid}}
    • v1: https://marketplace.twilio.com/v1/Listing/{{ListingSid}}
  • Installed Add-ons Usage Subresource
    • Preview: https://preview.twilio.com/marketplace/InstalledAddOns/{{InstalledAddOnSid}}/Usage
    • v1: https://marketplace.twilio.com/v1/InstalledAddOns/{{InstalledAddOnSid}}/Usage