Skip to contentSkip to navigationSkip to topbar

Memory API (v1) - Profile endpoints


(information)

Legal information

Conversation Memory, including the APIs, may use artificial intelligence or machine learning technologies and is subject to the terms of the Predictive and Generative AI/ML Features Addendum(link takes you to an external page). For more details on AI usage and data, see the AI Nutrition Facts.

Conversation Memory is not a HIPAA Eligible Service or PCI compliant and should not be enabled in workflows that are subject to HIPAA or PCI.

Conversation Memory is not intended for use with sensitive information about individuals. Twilio does not control what information comes from conversation channels and relies on you to ensure the data in customer profiles aligns with our acceptable use policy. Twilio does have limited guardrails in the form of a prompt exclusion that is designed to provide a minimal screening against inclusion of GDPR special category data(link takes you to an external page). As a reminder our profile technology uses generative artificial intelligence. Because generative artificial intelligence can make mistakes, review all outputs to ensure that the profile is correct.

Conversations products are only available in the new Twilio Console(link takes you to an external page). If your account hasn't been migrated, you'll be redirected to the legacy Console where these products won't appear.

Overview

overview page anchor

Tag description

Endpoints


POST/v1/Stores/{storeId}/Profiles

Base url: https://memory.twilio.com (base url)

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.

Request

create-profile-request page anchor

Path parameters

create-profile-path-parameters page anchor
Property nameTypeRequiredPIIDescription
storeIdstring
required
Not PII

A unique Memory Store ID using Twilio Type ID (TTID) format

Example: mem_store_00000000000000000000000000Pattern: ^mem_(store|service)_[0-7][0-9a-z]{25}$
Encoding type:application/json
SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
traitsobject

Optional

Multiple trait groups.

Example: {"Contact":{"email":"Alyssa.Mock@example.com","phone":"+13175551234","lastName":"Mock","firstName":"Alyssa","street":"123 Main St","city":"San Francisco","state":"CA","postalCode":"94107","country":"US"}}Max properties: 50
202400401403404429500503

Profile resolved and accepted for processing.

SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
idstring

Optional

The canonical profile ID.

Example: mem_profile_00000000000000000000000000Pattern: ^mem_profile_[0-7][0-9a-z]{25}$

messagestring

Optional

Example: Profile resolved and accepted for processing.Max length: 255
Create ProfileLink to code sample: Create Profile
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createProfile() {
11
const profile = await client.memory.v1
12
.profiles("mem_store_00000000000000000000000000")
13
.create({
14
traits: {},
15
});
16
17
console.log(profile.id);
18
}
19
20
createProfile();

Response

Note about this response
1
{
2
"message": "Profile resolved and accepted for processing.",
3
"id": "mem_profile_00000000000000000000000000"
4
}

GET/v1/Stores/{storeId}/Profiles

Base url: https://memory.twilio.com (base url)

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.

Property nameTypeRequiredPIIDescription
storeIdstring
required

A unique Memory Store ID using Twilio Type ID (TTID) format

Example: mem_store_00000000000000000000000000Pattern: ^mem_(store|service)_[0-7][0-9a-z]{25}$
Property nameTypeRequiredPIIDescription
pageSizeinteger

Optional

The maximum number of items to return per page, maximum of 1000.

Default: 50Minimum: 1Maximum: 1000

pageTokenstring

Optional

The token for the page of results to retrieve.

Max length: 500

orderByenum<string>

Optional

Either 'ASC' or 'DESC' to sort results ascending or descending respectively.

Default: DESCPossible values:
ASCDESC
200400401403404429500503

A list of profile IDs up to a maximum of 100.

Schema
Property nameTypeRequiredPIIDescriptionChild properties
profilesarray[string]

Optional

Example: ["mem_profile_00000000000000000000000000","mem_profile_00000000000000000000000001","mem_profile_00000000000000000000000002","mem_profile_00000000000000000000000003","mem_profile_00000000000000000000000004","mem_profile_00000000000000000000000005","mem_profile_00000000000000000000000006","mem_profile_00000000000000000000000007","mem_profile_00000000000000000000000008","mem_profile_00000000000000000000000009"]Max items: 100

metaobject

Optional

Max properties: 4
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listProfiles() {
11
const profiles = await client.memory.v1
12
.profiles("mem_store_00000000000000000000000000")
13
.list({
14
orderBy: "DESC",
15
limit: 20,
16
});
17
18
profiles.forEach((p) => console.log(p));
19
}
20
21
listProfiles();

Response

Note about this response
1
{
2
"meta": {
3
"key": "key",
4
"pageSize": 50,
5
"nextToken": "nextToken",
6
"previousToken": "previousToken"
7
},
8
"profiles": [
9
"mem_profile_00000000000000000000000000"
10
]
11
}

PATCH/v1/Stores/{storeId}/Profiles/{profileId}

Base url: https://memory.twilio.com (base url)

Merge one or more trait groups into 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.

Property nameTypeRequiredPIIDescription
storeIdstring
required

A unique Memory Store ID using Twilio Type ID (TTID) format

Example: mem_store_00000000000000000000000000Pattern: ^mem_(store|service)_[0-7][0-9a-z]{25}$

profileIdstring
required

The unique identifier for the profile using Twilio Type ID (TTID) format.

Example: mem_profile_00000000000000000000000000Pattern: ^mem_profile_[0-7][0-9a-z]{25}$
Encoding type:application/json
SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
traitsobject

Optional

Multiple trait groups.

Example: {"Contact":{"email":"Alyssa.Mock@example.com","phone":"+13175551234","lastName":"Mock","firstName":"Alyssa","street":"123 Main St","city":"San Francisco","state":"CA","postalCode":"94107","country":"US"}}Max properties: 50
202308400401403404429500503

Trait patch accepted.

SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
messagestring

Optional

Example: Trait modifications accepted for processing.Max length: 255
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function patchProfileTraits() {
11
const profile = await client.memory.v1
12
.profiles(
13
"mem_store_00000000000000000000000000",
14
"mem_profile_00000000000000000000000000"
15
)
16
.patch({
17
traits: {},
18
});
19
20
console.log(profile.message);
21
}
22
23
patchProfileTraits();

Response

Note about this response
1
{
2
"message": "Trait modifications accepted for processing."
3
}

DELETE/v1/Stores/{storeId}/Profiles/{profileId}

Base url: https://memory.twilio.com (base url)

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.

Property nameTypeRequiredPIIDescription
storeIdstring
required

A unique Memory Store ID using Twilio Type ID (TTID) format

Example: mem_store_00000000000000000000000000Pattern: ^mem_(store|service)_[0-7][0-9a-z]{25}$

profileIdstring
required

The unique identifier for the profile using Twilio Type ID (TTID) format.

Example: mem_profile_00000000000000000000000000Pattern: ^mem_profile_[0-7][0-9a-z]{25}$
202308400401403404429500503

Profile deletion accepted.

SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
messagestring

Optional

Example: Profile accepted for deletion.Max length: 512
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function deleteProfile() {
11
await client.memory.v1
12
.profiles(
13
"mem_store_00000000000000000000000000",
14
"mem_profile_00000000000000000000000000"
15
)
16
.remove();
17
}
18
19
deleteProfile();

Response

Note about this response
1
{
2
"message": "Profile accepted for deletion."
3
}

PUT/v1/Stores/{storeId}/Profiles/Bulk

Base url: https://memory.twilio.com (base url)

Create or update up to 1000 profiles in a single asynchronous batch. Each profile body follows the same structure as single profile creation. If a profile already exists its traits are merged (new keys added, existing keys overwritten). Large batches may take time to process; the 202 response indicates the batch has been accepted. Monitor downstream telemetry or audit logs to confirm completion.

Property nameTypeRequiredPIIDescription
storeIdstring
required

A unique Memory Store ID using Twilio Type ID (TTID) format

Example: mem_store_00000000000000000000000000Pattern: ^mem_(store|service)_[0-7][0-9a-z]{25}$
Encoding type:application/json
SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
profilesarray[object]

Optional

Min items: 1Max items: 1000
202400401403404429500503

Profiles batch accepted.

SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
messagestring

Optional

Example: Profile batch accepted for processing.Max length: 255
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function updateProfilesBulk() {
11
const bulk = await client.memory.v1
12
.bulk("mem_store_00000000000000000000000000")
13
.update({
14
profiles: [
15
{
16
traits: {},
17
},
18
],
19
});
20
21
console.log(bulk.message);
22
}
23
24
updateProfilesBulk();

Response

Note about this response
1
{
2
"message": "Profile batch accepted for processing."
3
}

POST/v1/Stores/{storeId}/Profiles/Imports

Base url: https://memory.twilio.com (base url)

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.

Property nameTypeRequiredPIIDescription
storeIdstring
required

A unique Memory Store ID using Twilio Type ID (TTID) format

Example: mem_store_00000000000000000000000000Pattern: ^mem_(store|service)_[0-7][0-9a-z]{25}$
Encoding type:application/json
SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
filenamestring
required

The name of the file to generate a presigned URL

Max length: 255

fileSizeinteger
required

The size of the file in bytes (1 byte to 100 MiB)

Minimum: 1Maximum: 104857600

columnMappingsarray[object]
required

Mappings of CSV header columns to traits' fields

Min items: 2Max items: 100
201400401403404429500503

Import task created.

SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
importIdstring

Optional

ID of the import task.

Example: mem_import_00000000000000000000000000Max length: 39

urlstring

Optional

Pre-signed URL to upload the CSV via a single PUT request.

Example: https://unified-profiles-csv-upload-stage-us-east-1.s3.amazonaws.com/object.txt?AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Signature=vjbyNxybdZaMmLa%2ByT372YEAiv4%3D&Expires=1741978496Max length: 2048
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createProfilesImportV2() {
11
const import_ = await client.memory.v1
12
.imports("mem_store_00000000000000000000000000")
13
.create({
14
filename: "filename",
15
fileSize: 4404020,
16
columnMappings: [
17
{
18
columnName: "columnName",
19
traitGroup: "traitGroup",
20
traitName: "traitName",
21
},
22
],
23
});
24
25
console.log(import_.importId);
26
}
27
28
createProfilesImportV2();

Response

Note about this response
1
{
2
"importId": "mem_import_00000000000000000000000000",
3
"url": "https://unified-profiles-csv-upload-stage-us-east-1.s3.amazonaws.com/object.txt?AWSAccessKeyId=AKIA..."
4
}

GET/v1/Stores/{storeId}/Profiles/Imports

Base url: https://memory.twilio.com (base url)

Retrieve a list of profile import task IDs that have been submitted for this service. Use these IDs to query individual import status details.

Property nameTypeRequiredPIIDescription
storeIdstring
required

A unique Memory Store ID using Twilio Type ID (TTID) format

Example: mem_store_00000000000000000000000000Pattern: ^mem_(store|service)_[0-7][0-9a-z]{25}$
200400401403404429500503

A list of import ids.

Schema
Property nameTypeRequiredPIIDescriptionChild properties
importsarray[string]

Optional

Max items: 100
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listProfileImportsV2() {
11
const imports = await client.memory.v1
12
.imports("mem_store_00000000000000000000000000")
13
.list({ limit: 20 });
14
15
imports.forEach((i) => console.log(i));
16
}
17
18
listProfileImportsV2();

Response

Note about this response
1
{
2
"imports": [
3
"mem_import_00000000000000000000000000"
4
]
5
}

GET/v1/Stores/{storeId}/Profiles/Imports/{importId}

Base url: https://memory.twilio.com (base url)

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.

Property nameTypeRequiredPIIDescription
storeIdstring
required

A unique Memory Store ID using Twilio Type ID (TTID) format

Example: mem_store_00000000000000000000000000Pattern: ^mem_(store|service)_[0-7][0-9a-z]{25}$

importIdstring
required

The task identifier for the import process.

Pattern: ^mem_import_[0-7][0-9a-z]{25}$
200400401403404429500503

Import Status.

Schema
Property nameTypeRequiredPIIDescriptionChild properties
statusenum<string>

Optional

Current processing status of the import task

Possible values:
PENDINGPROCESSINGCOMPLETEDFAILED

filenamestring

Optional

Original filename of the uploaded CSV

Example: profiles_import.csvMax length: 255

createdAtstring<date-time>

Optional

Timestamp when the import was created

Example: 2025-11-14T20:29:21Z

updatedAtstring<date-time>

Optional

Timestamp when the import was last updated

Example: 2025-11-14T20:30:15Z

fileSizeinteger

Optional

Size of the uploaded file in bytes (1 byte to 100 MiB)

Example: 204800Minimum: 1Maximum: 104857600

columnMappingsarray[object]

Optional

Mappings of CSV header columns to traits' fields

Min items: 2Max items: 100

summaryobject

Optional

Summary statistics of the import operation

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchProfileImportV2() {
11
const import_ = await client.memory.v1
12
.imports(
13
"mem_store_00000000000000000000000000",
14
"mem_import_01111111111111111111111111"
15
)
16
.fetch();
17
18
console.log(import_.status);
19
}
20
21
fetchProfileImportV2();

Response

Note about this response
1
{
2
"columnMappings": [
3
{
4
"columnName": "columnName",
5
"traitGroup": "traitGroup",
6
"traitName": "traitName"
7
}
8
],
9
"createdAt": "2009-07-06T20:30:00Z",
10
"fileSize": 204800,
11
"filename": "filename",
12
"status": "PENDING",
13
"summary": {
14
"errors": 10,
15
"warnings": 5
16
},
17
"updatedAt": "2009-07-06T20:30:00Z"
18
}