Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

ExportConfiguration Resource


The Export Configuration for a resource has two uses:

  1. setting automatic generation of files by setting "enabled" to true (in the case of Editions customers)
  2. setting the callback method for when the automatic generation of the file has been completed

You can send this via:

  • webhook
  • email

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.


ExportConfiguration Properties

exportconfiguration-properties page anchor
Resource properties
enabledtype: booleanNot PII

If true, Twilio will automatically generate every day's file when the day is over.


webhook_urltype: string<URI>Not PII

Stores the URL destination for the method specified in webhook_method.


webhook_methodtype: stringNot PII

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


resource_typetype: stringNot PII

The type of communication – Messages, Calls, Conferences, and Participants


urltype: string<URI>Not PII

The URL of this resource.


Fetch an ExportConfiguration resource

fetch-an-exportconfiguration-resource page anchor
GET https://bulkexports.twilio.com/v1/Exports/{ResourceType}/Configuration

Parameters

fetch-parameters page anchor
URI parameters
ResourceTypetype: stringNot PII
Path Parameter

The type of communication – Messages, Calls, Conferences, and Participants

Fetch an Export Configuration for Messages

fetch-an-export-configuration-for-messages page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.bulkexports.v1.exportConfiguration('Messages')
_10
.fetch()
_10
.then(export_configuration => console.log(export_configuration.enabled));

Output

_10
{
_10
"url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10
"enabled": true,
_10
"webhook_url": "",
_10
"webhook_method": "",
_10
"resource_type": "Messages"
_10
}

Fetch a Export Configuration for Calls

fetch-a-export-configuration-for-calls page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.bulkexports.v1.exportConfiguration('Calls')
_10
.fetch()
_10
.then(export_configuration => console.log(export_configuration.enabled));

Output

_10
{
_10
"url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10
"enabled": true,
_10
"webhook_url": "",
_10
"webhook_method": "",
_10
"resource_type": "Calls"
_10
}


Update an ExportConfiguration resource

update-an-exportconfiguration-resource page anchor
POST https://bulkexports.twilio.com/v1/Exports/{ResourceType}/Configuration

URI parameters
ResourceTypetype: stringNot PII
Path Parameter

The type of communication – Messages, Calls, Conferences, and Participants


Request body parameters
Enabledtype: booleanNot PII

If true, Twilio will automatically generate every day's file when the day is over.


WebhookUrltype: string<URI>Not PII

Stores the URL destination for the method specified in webhook_method.


WebhookMethodtype: stringNot PII

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

Update Export Configuration

update-export-configuration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_13
// Download the helper library from https://www.twilio.com/docs/node/install
_13
// Find your Account SID and Auth Token at twilio.com/console
_13
// and set the environment variables. See http://twil.io/secure
_13
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_13
const authToken = process.env.TWILIO_AUTH_TOKEN;
_13
const client = require('twilio')(accountSid, authToken);
_13
_13
client.bulkexports.v1.exportConfiguration('Messages')
_13
.update({
_13
webhookMethod: 'GET',
_13
webhookUrl: 'https://api.your-infrastructure.com/receive-messages/'
_13
})
_13
.then(export_configuration => console.log(export_configuration.enabled));

Output

_10
{
_10
"url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10
"enabled": true,
_10
"webhook_url": "https://api.your-infrastructure.com/receive-messages/",
_10
"resource_type": "Messages",
_10
"webhook_method": "GET"
_10
}


Rate this page: