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

Entity Resource


The Entity resource represents a user or other identity that needs verification. A Service contains Entities and an Entity contains Factors.


Entity Properties

entity-properties page anchor
(warning)

Warning

Do not use Personally Identifiable Information for identity. Use an immutable user identifier like a system UUID, GUID, or SID.
Verify Push uses identity as a unique identifier of a user. You should not use directly identifying information (aka personally identifiable information or PII) like a person's name, home address, email or phone number, etc., as identity because the systems that will process this attribute assume it is not directly identifying information.

Resource properties
sidtype: SID<YE>Not PII

A 34 character string that uniquely identifies this Entity.


identitytype: stringPII MTL: 30 days

The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.


account_sidtype: SID<AC>Not PII

The unique SID identifier of the Account.


service_sidtype: SID<VA>Not PII

The unique SID identifier of the Service.


date_updatedtype: string<DATE TIME>Not PII

The date that this Entity was updated, given in ISO 8601(link takes you to an external page) format.


urltype: string<URI>Not PII

The URL of this resource.


linkstype: object<URI MAP>Not PII

Contains a dictionary of URL links to nested resources of this Entity.


Create an Entity resource

create-an-entity-resource page anchor
POST https://verify.twilio.com/v2/Services/{ServiceSid}/Entities

Parameters

create-parameters page anchor
URI parameters
ServiceSidtype: SID<VA>Not PII
Path Parameter

The unique SID identifier of the Service.


Request body parameters
Identitytype: stringPII MTL: 30 days
Required

The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.entities
_11
.create({identity: 'identity'})
_11
.then(entity => console.log(entity.sid));

Output

_14
{
_14
"sid": "YEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"identity": "ff483d1ff591898a9942916050d2ca3f",
_14
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"service_sid": "VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"date_created": "2015-07-30T20:00:00Z",
_14
"date_updated": "2015-07-30T20:00:00Z",
_14
"url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f",
_14
"links": {
_14
"factors": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
_14
"new_factors": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
_14
"challenges": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges"
_14
}
_14
}


Fetch an Entity resource

fetch-an-entity-resource page anchor
GET https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}

URI parameters
ServiceSidtype: SID<VA>Not PII
Path Parameter

The unique SID identifier of the Service.


Identitytype: stringPII MTL: 30 days
Path Parameter

The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.entities('identity')
_11
.fetch()
_11
.then(entity => console.log(entity.sid));

Output

_14
{
_14
"sid": "YEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"identity": "ff483d1ff591898a9942916050d2ca3f",
_14
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"service_sid": "VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"date_created": "2015-07-30T20:00:00Z",
_14
"date_updated": "2015-07-30T20:00:00Z",
_14
"url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f",
_14
"links": {
_14
"factors": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
_14
"new_factors": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
_14
"challenges": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges"
_14
}
_14
}


Read multiple Entity resources

read-multiple-entity-resources page anchor
GET https://verify.twilio.com/v2/Services/{ServiceSid}/Entities

URI parameters
ServiceSidtype: SID<VA>Not PII
Path Parameter

The unique SID identifier of the Service.


PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.entities
_11
.list({limit: 20})
_11
.then(entities => entities.forEach(e => console.log(e.sid)));

Output

_27
{
_27
"entities": [
_27
{
_27
"sid": "YEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"identity": "ff483d1ff591898a9942916050d2ca3f",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"service_sid": "VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"date_created": "2015-07-30T20:00:00Z",
_27
"date_updated": "2015-07-30T20:00:00Z",
_27
"url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f",
_27
"links": {
_27
"factors": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
_27
"new_factors": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
_27
"challenges": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges"
_27
}
_27
}
_27
],
_27
"meta": {
_27
"page": 0,
_27
"page_size": 50,
_27
"first_page_url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities?PageSize=50&Page=0",
_27
"previous_page_url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities?PageSize=50&Page=0",
_27
"url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities?PageSize=50&Page=0",
_27
"next_page_url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities?PageSize=50&Page=1",
_27
"key": "entities"
_27
}
_27
}


Delete an Entity resource

delete-an-entity-resource page anchor
DELETE https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}

URI parameters
ServiceSidtype: SID<VA>Not PII
Path Parameter

The unique SID identifier of the Service.


Identitytype: stringPII MTL: 30 days
Path Parameter

The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

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.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.entities('identity')
_10
.remove();


Rate this page: