# Listing Resource

> \[!WARNING]
>
> The Preview API for this resource is deprecated. To migrate from Preview to V1, refer to the Marketplace API migration guide for [users](/docs/marketplace/listings/api-migration-users) or [publishers](/docs/marketplace/publishers/api-migration-publishers).

This resource allows Marketplace publishers to fetch or update Listings. A Listing represents the data of a published Marketplace Catalog Listing.

> \[!NOTE]
>
> To get access to this resource, contact your Twilio Account Executive.

## Listing Properties

| Property Name   | Description                                                                                                | Type          | PII?    |
| --------------- | ---------------------------------------------------------------------------------------------------------- | ------------- | ------- |
| `url`           | The URL of the API call.                                                                                   | `string<uri>` | Not PII |
| `sid`           | The unique identifier of a Listing. Pattern: `^XB[0-9a-fA-F]{32}$` Min length: `34` Max length: `34`       | `SID<XB>`     | Not PII |
| `description`   | A JSON object describing the Listing.                                                                      | `string`      | Not PII |
| `support`       | A JSON object containing information on how Listing users can obtain support for the Listing.              | `string`      | Not PII |
| `policies`      | A JSON object describing the Listing's privacy and legal policies.                                         | `string`      | Not PII |
| `module_info`   | A JSON object containing essential attributes that define a Listing.                                       | `string`      | Not PII |
| `documentation` | A JSON object for providing comprehensive information, instructions, and resources related to the Listing. | `string`      | Not PII |

## Fetch a Listing

`GET https://marketplace.twilio.com/v1/Listing/{Sid}`

This endpoint returns the data of a given Listing. To find a Listing's SID, use the [Available Add-ons resource](/docs/marketplace/api/available-add-ons), or view Listing details in the [Catalog](https://console.twilio.com/us1/develop/add-ons/catalog) or the [My Listings tab](https://console.twilio.com/us1/develop/add-ons/publish/my-listings).

### Path parameters

| Parameter Name | Description                                                                                             | Type      | Required? | PII?    |
| -------------- | ------------------------------------------------------------------------------------------------------- | --------- | --------- | ------- |
| `Sid`          | The unique identifier of a Listing. Pattern: `^XB[0-9a-fA-F]{32}$`. Min length: `34`. Max length: `34`. | `SID<XB>` | Required  | Not PII |

Fetch a Listing

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchModuleDataManagement() {
  const moduleDataManagement = await client.marketplace.v1
    .moduleDataManagement("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(moduleDataManagement.url);
}

fetchModuleDataManagement();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

module_data_management = client.marketplace.v1.module_data_management(
    "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).fetch()

print(module_data_management.url)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Marketplace.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var moduleDataManagement = await ModuleDataManagementResource.FetchAsync(
            pathSid: "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(moduleDataManagement.Url);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.marketplace.v1.ModuleDataManagement;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ModuleDataManagement moduleDataManagement =
            ModuleDataManagement.fetcher("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        System.out.println(moduleDataManagement.getUrl());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.MarketplaceV1.FetchModuleDataManagement("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Url != nil {
			fmt.Println(*resp.Url)
		} else {
			fmt.Println(resp.Url)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$module_data_management = $twilio->marketplace->v1
    ->moduleDataManagement("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $module_data_management->url;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

module_data_management = @client
                         .marketplace
                         .v1
                         .module_data_management('XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                         .fetch

puts module_data_management.url
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:marketplace:v1:listing:fetch \
   --sid XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://marketplace.twilio.com/v1/Listing/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://marketplace.twilio.com/v1/Listing/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "description": {
    "body": "aBody",
    "highlights": [
      {
        "title": "aTitle",
        "description": "aDescription"
      }
    ],
    "code_samples": [
      {
        "title": "aTitle",
        "description": "aDescription",
        "code": "aCode"
      }
    ]
  },
  "support": {
    "customer_support_email": "anEmail",
    "customer_support_phone": "+1 888-888-8888",
    "support_description": "aDescription",
    "billing_email": "anEmail",
    "billing_phone": "+1 888-888-8888",
    "technical_email": "anEmail",
    "technical_phone": "+1 888-888-8888"
  },
  "policies": {
    "privacy": "someUrl",
    "legal": "someOtherUrl"
  },
  "module_info": {
    "tag": "Description",
    "tagline": "aTagline",
    "logo_url": "aUrl",
    "logo_bg_color_hex": "#ff5722"
  },
  "documentation": {
    "body": "aBody"
  },
  "pricing": {
    "body": "Basic plan - $10/month"
  },
  "configuration": {
    "buttons": [
      {
        "url": "https://example.com",
        "label": "Configurable button text",
        "help_text": "The button text, url, and help text are now configurable via self service"
      }
    ],
    "notification_configuration": {
      "callback_url": "https://example.com"
    }
  }
}
```

## Update a Listing

`POST https://marketplace.twilio.com/v1/Listing/{Sid}`

This endpoint updates the properties of a given Listing.

### Path parameters

| Parameter Name | Description                                                                                             | Type      | Required? | PII?    |
| -------------- | ------------------------------------------------------------------------------------------------------- | --------- | --------- | ------- |
| `Sid`          | The unique identifier of a Listing. Pattern: `^XB[0-9a-fA-F]{32}$`. Min length: `34`. Max length: `34`. | `SID<XB>` | Required  | Not PII |

### Request body parameters

| Parameter Name  | Description                                                                                                                                                                                            | Type     | Required? | PII?    |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | --------- | ------- |
| `ModuleInfo`    | A JSON object containing essential attributes that define a Listing. See the [`ModuleInfo` object details](#moduleinfo-object-details) in the table below.                                             | `string` | Optional  | Not PII |
| `Description`   | A JSON object describing the Listing. See the [`Description` object details](#description-object-details) in the table below.                                                                          | `string` | Optional  | Not PII |
| `Documentation` | A JSON object for providing comprehensive information, instructions, and resources related to the Listing. See the [`Documentation` object details](#documentation-object-details) in the table below. | `string` | Optional  | Not PII |
| `Policies`      | A JSON object describing the Listing's privacy and legal policies. See the [`Policies` object details](#policies-object-details) in the table below.                                                   | `string` | Optional  | Not PII |
| `Support`       | A JSON object containing information on how Listing users can obtain support for the Listing. See the [`Support` object details](#support-object-details) in the table below.                          | `string` | Optional  | Not PII |

#### ModuleInfo object details

| Key                 | Description                                                                               |
| ------------------- | ----------------------------------------------------------------------------------------- |
| `tagline`           | A succinct and compelling statement that encapsulates the Listing's purpose and benefits. |
| `logo_url`          | A publicly accessible URL pointing to the Listing's logo image.                           |
| `logo_bg_color_hex` | The hexadecimal color code representing the background color of the Listing's logo.       |

```json
{
      "tagline" : "Enhance your communication with our innovative module",
      "logo_url" : "https://example.com/wp-content/uploads/2023/07/S-logo-white-256px.png",
      "logo_bg_color_hex" : "#ff5722"
}
```

#### Description object details

| Key          | Description                                                                                                                        |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| `body`       | The core description of the Listing in Markdown formatting. HTML tags and images are not supported.                                |
| `highlights` | A complete list of all highlights objects of the Listing. You can pass a title and a corresponding description for each highlight. |

```json
{
    "body" : "Enhance your communication with our innovative module",
      "highlights" : [
        {"title":"Feature 1" ,"description":"Streamline your workflows."},
        {"title":"Feature 2" ,"description":"Seamless integration with your apps."}
      ]
}
```

#### Documentation object details

| Key    | Description                                                                                                            |
| ------ | ---------------------------------------------------------------------------------------------------------------------- |
| `body` | Informative and helpful Markdown text guiding users on how to use the Listing. HTML tags and images are not supported. |

```json
{
    "body" : "### Instant Free Trial -- Start Today within Minutes… \r\n\r\n"
}
```

#### Policies object details

| Key       | Description                                                                                                                                |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `privacy` | Text describing the privacy policy for users using the Listing. Use Markdown when providing links. HTML tags and images are not supported. |
| `legal`   | Text describing the legal policy for users using the Listing. Use Markdown when providing links. HTML tags and images are not supported.   |

```json
{
    "privacy" : "[https://www.twilio.com/legal/privacy](https://www.twilio.com/legal/privacy)",
    "legal" : "[https://www.twilio.com/legal/tos](https://www.twilio.com/legal/tos)"
}
```

#### Support object details

| Key                      | Description                                                                                                         |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| `billing_email`          | Email address for billing-related inquiries.                                                                        |
| `billing_phone`          | Phone number for billing-related inquiries.                                                                         |
| `technical_email`        | Email address for technical support.                                                                                |
| `technical_phone`        | Phone number for technical support.                                                                                 |
| `customer_support_email` | Email address for general customer support.                                                                         |
| `support_description`    | A description of available support resources, presented in Markdown format. HTML tags and images are not supported. |

```json
{
    "billing_email":"accounts@example.com",
    "billing_phone":"+1 617-555-1313",
    "technical_email":"support@example.com",
    "technical_phone":"+1 617-555-3434",
    "customer_support_email":"support@example.com",
    "customer_support_phone":"+1 617-555-1212",
    "support_description":"Please use Add-on Support form to request support for this Add-on"
}
```

Update a Listing

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function updateModuleDataManagement() {
  const moduleDataManagement = await client.marketplace.v1
    .moduleDataManagement("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .update({ moduleInfo: "ModuleInfo" });

  console.log(moduleDataManagement.url);
}

updateModuleDataManagement();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

module_data_management = client.marketplace.v1.module_data_management(
    "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).update(module_info="ModuleInfo")

print(module_data_management.url)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Marketplace.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var moduleDataManagement = await ModuleDataManagementResource.UpdateAsync(
            moduleInfo: "ModuleInfo", pathSid: "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(moduleDataManagement.Url);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.marketplace.v1.ModuleDataManagement;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ModuleDataManagement moduleDataManagement =
            ModuleDataManagement.updater("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").setModuleInfo("ModuleInfo").update();

        System.out.println(moduleDataManagement.getUrl());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	marketplace "github.com/twilio/twilio-go/rest/marketplace/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &marketplace.UpdateModuleDataManagementParams{}
	params.SetModuleInfo("ModuleInfo")

	resp, err := client.MarketplaceV1.UpdateModuleDataManagement("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Url != nil {
			fmt.Println(*resp.Url)
		} else {
			fmt.Println(resp.Url)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$module_data_management = $twilio->marketplace->v1
    ->moduleDataManagement("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->update(["moduleInfo" => "ModuleInfo"]);

print $module_data_management->url;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

module_data_management = @client
                         .marketplace
                         .v1
                         .module_data_management('XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                         .update(module_info: 'ModuleInfo')

puts module_data_management.url
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:marketplace:v1:listing:update \
   --sid XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --module-info ModuleInfo
```

```bash
curl -X POST "https://marketplace.twilio.com/v1/Listing/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
--data-urlencode "ModuleInfo=ModuleInfo" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://marketplace.twilio.com/v1/Listing/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "description": {
    "body": "aBody",
    "highlights": [
      {
        "title": "aTitle",
        "description": "aDescription"
      }
    ],
    "code_samples": [
      {
        "title": "aTitle",
        "description": "aDescription",
        "code": "aCode"
      }
    ]
  },
  "support": {
    "customer_support_email": "anEmail",
    "customer_support_phone": "+1 888-888-8888",
    "support_description": "aDescription",
    "billing_email": "anEmail",
    "billing_phone": "+1 888-888-8888",
    "technical_email": "anEmail",
    "technical_phone": "+1 888-888-8888"
  },
  "policies": {
    "privacy": "someUrl",
    "legal": "someOtherUrl"
  },
  "module_info": "ModuleInfo",
  "documentation": {
    "body": "aBody"
  },
  "pricing": {
    "body": "Basic plan - $10/month"
  },
  "configuration": {
    "buttons": [
      {
        "url": "https://example.com",
        "label": "Configurable button text",
        "help_text": "The button text, url, and help text are now configurable via self service"
      }
    ],
    "notification_configuration": {
      "callback_url": "https://example.com"
    }
  }
}
```

### Errors

If an error occurs when updating a Listing, the API returns a 400 HTTP status along with relevant error messages. Additionally, a notification is published in the Twilio Debugger to help with further troubleshooting and analysis.

Here are some common error scenarios along with their associated HTTP statuses and messages:

| Error Scenario              | HTTP Response and Error Message                                                                         |
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
| Missing required parameter  | 400. The \[parameter name] parameter is required and must be provided.                                  |
| Invalid JSON format         | 400. Invalid JSON format. Please ensure the request body adheres to the correct JSON structure.         |
| Exceeding maximum file size | 400. The JSON size exceeds the maximum allowed limit of 5MB. Please reduce the JSON size and try again. |
| Module not found            | 404. The specified Module was not found. Please provide a valid Module ID.                              |
| Internal server error       | 500. An internal server error occurred. Please contact support for further assistance.                  |
