NAME
Twilio::Rest::Memory::V1::Profile - The Profile resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $profile = $client->memory->v1->profiles($store_id)->create(\%body);
for my $profile ($client->memory->v1->profiles($store_id)->read({}, 20)) {
...
}
my $profile = $client->memory->v1->profiles($store_id, $profile_id)->fetch;
$client->memory->v1->profiles($store_id, $profile_id)->patch(\%body);
$client->memory->v1->profiles($store_id, $profile_id)->delete;
DESCRIPTION
This file holds ProfileList, ProfilePage, ProfileContext, ProfileInstance, FetchProfile301ResponseInstance, PatchProfileTraits202ResponseInstance and DeleteProfile202ResponseInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
ProfileList
Returned by $client->memory->v1->profiles($store_id). See also Twilio::ListResource.
create
my $profile = $client->memory->v1->profiles($store_id)->create(\%body);
Create a new profile and set initial traits. The request synchronously resolves identity and either creates a new profile ID or retrieves the associated canonical profile ID based on any provided identifier traits present in the request. The request must contain at least one trait that is promoted to an identifier in its trait group settings. Any additional traits are queued for asynchronous processing. Returns a ProfileInstance.
%body is sent as JSON. It takes the names Twilio's API documentation uses.
Its fields are:
traits-
No description in the specification.
read
my @records = $client->memory->v1->profiles($store_id)->read(\%options, $limit, $page_size);
Return a paginated list of profile IDs ordered by most recently created first. Use the optional paging parameters (pageSize, pageToken, orderBy) to control pagination and sorting. This endpoint is optimized for browsing newly created profiles and lightweight lookups where only the identifiers are needed before requesting full profile details. 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->profiles($store_id)->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->memory->v1->profiles($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->profiles($store_id)->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->memory->v1->profiles($store_id)->get_context($profile_id);
Returns a ProfileContext, and makes no request.
ProfilePage
A Twilio::Page of ProfileInstance objects.
records_key
build_instance
Used by Twilio::Page.
ProfileContext
Returned by $client->memory->v1->profiles($store_id, $profile_id). It makes no request until one of these methods is called.
fetch
my $profile = $client->memory->v1->profiles($store_id, $profile_id)->fetch(\%options);
Retrieve profile traits by profile ID. Use the traitGroups query parameter to restrict results to a comma-separated allow list of trait group names. For large sets of traits, prefer using the dedicated /Traits endpoint for pagination. Returns a FetchProfile301ResponseInstance when Twilio answers 301, and a ProfileInstance otherwise.
The options are:
trait_groups-
Comma separated list of trait group names to include.
patch
my $profile = $client->memory->v1->profiles($store_id, $profile_id)->patch(\%body);
Update or add specific traits to an existing profile. Only the traits provided are added or updated; unspecified traits remain unchanged. Only pre-defined trait groups and traits configured for the memory store can be patched. To remove a trait entirely, set its value to null. Returns a FetchProfile301ResponseInstance when Twilio answers 308, and a PatchProfileTraits202ResponseInstance otherwise.
%body is sent as JSON. It takes the names Twilio's API documentation uses.
Its fields are:
traits-
No description in the specification.
delete
$client->memory->v1->profiles($store_id, $profile_id)->delete;
Asynchronously delete the profile permanently and all associated identifiers and traits. This operation is irreversible. Downstream caches or analytical stores may take time to reflect the deletion. Use cautiously and consider a soft‑delete strategy if regulatory or recovery requirements apply. Returns a DeleteProfile202ResponseInstance when Twilio answers 202, and a FetchProfile301ResponseInstance otherwise.
ProfileInstance
See also Twilio::InstanceResource.
It has fetch, patch and delete, which work as they do on the context.
Its fields are:
- created_at
-
The time the profile was created. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- id
-
No description in the specification.
- message
-
No description in the specification.
- traits
-
No description in the specification.
FetchProfile301ResponseInstance
Returned by fetch, patch and delete, for an answer that is not a Profile. See also Twilio::InstanceResource.
Its fields are:
- message
-
No description in the specification.
- uri
-
No description in the specification.
PatchProfileTraits202ResponseInstance
Returned by patch, for an answer that is not a Profile. See also Twilio::InstanceResource.
Its fields are:
- message
-
No description in the specification.
DeleteProfile202ResponseInstance
Returned by delete, for an answer that is not a Profile. See also Twilio::InstanceResource.
Its fields are:
- message
-
No description in the specification.
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.