ExportConfiguration Resource
The Export Configuration for a resource has two uses:
-
setting automatic generation of files by setting "enabled" to true (in the case of Editions customers)
-
setting the callback method for when the automatic generation of the file has been completed
You can send this via:
The webhook_method must be either GET
or POST
, and webhook_url should be the URL of the service you want to call when the file is available. For email, the email parameter should be an email address.
Property nameTypePIIDescription
If true, Twilio will automatically generate every day's file when the day is over.
Stores the URL destination for the method specified in webhook_method.
Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url
The type of communication – Messages, Calls, Conferences, and Participants
The URL of this resource.
GET https://bulkexports.twilio.com/v1/Exports/{ResourceType}/Configuration
Property nameTypeRequiredPIIDescription
ResourceTypestringrequired The type of communication – Messages, Calls, Conferences, and Participants
_18// Download the helper library from https://www.twilio.com/docs/node/install
_18const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18// Find your Account SID and Auth Token at twilio.com/console
_18// and set the environment variables. See http://twil.io/secure
_18const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18const authToken = process.env.TWILIO_AUTH_TOKEN;
_18const client = twilio(accountSid, authToken);
_18async function fetchExportConfiguration() {
_18 const exportConfiguration = await client.bulkexports.v1
_18 .exportConfiguration("Messages")
_18 console.log(exportConfiguration.enabled);
_18fetchExportConfiguration();
_10 "url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10 "webhook_method": "",
_10 "resource_type": "Messages"
_18// Download the helper library from https://www.twilio.com/docs/node/install
_18const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18// Find your Account SID and Auth Token at twilio.com/console
_18// and set the environment variables. See http://twil.io/secure
_18const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18const authToken = process.env.TWILIO_AUTH_TOKEN;
_18const client = twilio(accountSid, authToken);
_18async function fetchExportConfiguration() {
_18 const exportConfiguration = await client.bulkexports.v1
_18 .exportConfiguration("Calls")
_18 console.log(exportConfiguration.enabled);
_18fetchExportConfiguration();
_10 "url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10 "webhook_method": "",
_10 "resource_type": "Calls"
POST https://bulkexports.twilio.com/v1/Exports/{ResourceType}/Configuration
Property nameTypeRequiredPIIDescription
ResourceTypestringrequired The type of communication – Messages, Calls, Conferences, and Participants
Property nameTypeRequiredPIIDescription
If true, Twilio will automatically generate every day's file when the day is over.
WebhookUrlstring<uri>Optional Stores the URL destination for the method specified in webhook_method.
WebhookMethodstringOptional Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url
_21// Download the helper library from https://www.twilio.com/docs/node/install
_21const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21// Find your Account SID and Auth Token at twilio.com/console
_21// and set the environment variables. See http://twil.io/secure
_21const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21const authToken = process.env.TWILIO_AUTH_TOKEN;
_21const client = twilio(accountSid, authToken);
_21async function updateExportConfiguration() {
_21 const exportConfiguration = await client.bulkexports.v1
_21 .exportConfiguration("Messages")
_21 webhookMethod: "GET",
_21 webhookUrl: "https://api.your-infrastructure.com/receive-messages/",
_21 console.log(exportConfiguration.enabled);
_21updateExportConfiguration();
_10 "url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10 "webhook_url": "https://api.your-infrastructure.com/receive-messages/",
_10 "resource_type": "Messages",
_10 "webhook_method": "GET"