NAME
Twilio::Rest::Memory::V1::Import - The Import resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $import = $client->memory->v1->imports($store_id)->create(\%body);
for my $import ($client->memory->v1->imports($store_id)->read({}, 20)) {
...
}
my $import = $client->memory->v1->imports($store_id, $import_id)->fetch;
DESCRIPTION
This file holds ImportList, ImportPage, ImportContext, ImportInstance, ProfileImportCreatedResponseInstance and FetchProfileImportV2200ResponseInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
ImportList
Returned by $client->memory->v1->imports($store_id). See also Twilio::ListResource.
create
my $import = $client->memory->v1->imports($store_id)->create(\%body);
Initiate a profile import by requesting a pre-signed upload URL and an associated importId. Upload your CSV to the returned URL (single PUT). Query the import status endpoint to track processing progress. This endpoint creates the import task and allocates resources for subsequent ingestion. Returns a ProfileImportCreatedResponseInstance.
%body is sent as JSON. It takes the names Twilio's API documentation uses.
Its fields are:
columnMappings-
Required. Mappings of CSV header columns to traits' fields
fileSize-
Required. The size of the file in bytes (1 byte to 100 MiB)
filename-
Required. The name of the file to generate a presigned URL
read
my @records = $client->memory->v1->imports($store_id)->read(\%options, $limit, $page_size);
Retrieve a paginated list of profile import task IDs submitted for this service, ordered by import recency. Use the returned IDs to query individual import status details, and the paging parameters to iterate through larger sets. orderBy defaults to DESC; omitting pageSize/pageToken returns a default first page. Returns the records as a list, fetching as many pages as it needs.
The options are:
order_by-
Either 'ASC' or 'DESC' to sort results ascending or descending respectively. One of
ASCorDESC.
stream
my $stream = $client->memory->v1->imports($store_id)->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->memory->v1->imports($store_id)->page(\%options, $page_size, $page_token);
Fetches one page, and returns a Twilio::TokenPaginationPage. This API pages by token, so there is no page number.
get_page
my $page = $client->memory->v1->imports($store_id)->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->memory->v1->imports($store_id)->get_context($import_id);
Returns a ImportContext, and makes no request.
ImportPage
A Twilio::Page of ImportInstance objects.
records_key
build_instance
Used by Twilio::Page.
ImportContext
Returned by $client->memory->v1->imports($store_id, $import_id). It makes no request until one of these methods is called.
fetch
my $import = $client->memory->v1->imports($store_id, $import_id)->fetch;
Retrieve the current processing status of a previously submitted bulk import task. Query this endpoint using the importId returned from the upload URL request until a terminal state (COMPLETED or FAILED) is reached. Returns a FetchProfileImportV2200ResponseInstance.
ImportInstance
See also Twilio::InstanceResource.
It has fetch, which work as they do on the context.
Its fields are:
- id
-
The import operation ID.
ProfileImportCreatedResponseInstance
Returned by create, for an answer that is not a Import. See also Twilio::InstanceResource.
Its fields are:
- created_at
-
ISO 8601 timestamp when the operation was created. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- import_id
-
ID of the import task.
- operation_id
-
No description in the specification.
- status_url
-
URL to query the operation status.
- url
-
Pre-signed URL to upload the CSV via a single PUT request.
FetchProfileImportV2200ResponseInstance
Returned by fetch, for an answer that is not a Import. See also Twilio::InstanceResource.
Its fields are:
- column_mappings
-
Mappings of CSV header columns to traits' fields
- created_at
-
Timestamp when the import was created A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- file_size
-
Size of the uploaded file in bytes (1 byte to 100 MiB)
- filename
-
Original filename of the uploaded CSV
- status
-
Current processing status of the import task One of
PENDING,PROCESSING,COMPLETEDorFAILED. - summary
-
Summary statistics of the import operation
- updated_at
-
Timestamp when the import was last updated A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.