# EndUsers resource

> \[!WARNING]
>
> Twilio released the Regulatory Compliance API v2 under Public Beta.

The end user represents an individual or business that must comply with [regulations][reg-rsrc]. This end user answers a phone call or receives a message from a phone number. To learn more about supported end user categories, see the [`EndUserType` resource][endusertype-rsrc].

To meet regulatory compliance, you must submit a [Regulatory Bundle][reg-bundle-rsrc] to the regulator. These bundles combine end users who use the phone number and [supporting documents][sup-docs-rsrc] that verify the end user, number, and, if needed, company.

After you create an empty Regulatory Bundle, you can [assign end users][item-assign-rsrc] created with this resource to that bundle.

## EndUsers response properties

The `EndUsers` resource returns a response in JSON format. To learn more about Twilio SIDs, see the [glossary entry on SIDs](/docs/glossary/what-is-a-sid).

```json
{"type":"object","refName":"numbers.v2.regulatory_compliance.end_user","modelName":"numbers_v2_regulatory_compliance_end_user","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^IT[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string created by Twilio to identify the End User resource."},"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Account](/docs/iam/api/account) that created the End User resource."},"friendly_name":{"type":"string","nullable":true,"description":"The string that you assigned to describe the resource."},"type":{"type":"string","enum":["individual","business"],"description":"The type of end user of the Bundle resource - can be `individual` or `business`.","refName":"end_user_enum_type","modelName":"end_user_enum_type"},"attributes":{"nullable":true,"description":"The set of parameters that are the attributes of the End Users resource which are listed in the End User Types.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}},"date_created":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"date_updated":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the End User resource."}}}
```

## Create one end user instance

`POST https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers`

To provision or port a phone number to Twilio, create an end user for that phone number.

Each end user represents the individual or business who answers a phone call or receives a text message.

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateEndUserRequest","required":["FriendlyName","Type"],"properties":{"FriendlyName":{"type":"string","description":"The string that you assigned to describe the resource."},"Type":{"type":"string","enum":["individual","business"],"description":"The type of end user of the Bundle resource - can be `individual` or `business`.","refName":"end_user_enum_type","modelName":"end_user_enum_type"},"Attributes":{"description":"The set of parameters that are the attributes of the End User resource which are derived End User Types.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}}}},"examples":{"create":{"value":{"lang":"json","value":"{\n  \"FriendlyName\": \"friendly_name\",\n  \"Type\": \"individual\",\n  \"Attributes\": \"{}\"\n}","meta":"","code":"{\n  \"FriendlyName\": \"friendly_name\",\n  \"Type\": \"individual\",\n  \"Attributes\": \"{}\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"FriendlyName\"","#7EE787"],[":","#C9D1D9"]," ",["\"friendly_name\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Type\"","#7EE787"],[":","#C9D1D9"]," ",["\"individual\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Attributes\"","#7EE787"],[":","#C9D1D9"]," ",["\"{}\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Create one end user instance

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createEndUser() {
  const endUser = await client.numbers.v2.regulatoryCompliance.endUsers.create({
    attributes: {
      business_name: "Twilio",
      vat: "2348132",
      business_description: "Communications Platform as a Service",
    },
    friendlyName: "Twilio, Inc.",
    type: "business",
  });

  console.log(endUser.sid);
}

createEndUser();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

end_user = client.numbers.v2.regulatory_compliance.end_users.create(
    friendly_name="Twilio, Inc.",
    type="business",
    attributes={
        "business_name": "Twilio",
        "vat": "2348132",
        "business_description": "Communications Platform as a Service",
    },
)

print(end_user.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var endUser = await EndUserResource.CreateAsync(
            friendlyName: "Twilio, Inc.",
            type: EndUserResource.TypeEnum.Business,
            attributes: new Dictionary<string, Object>() {
                { "business_name", "Twilio" },
                { "vat", "2348132" },
                { "business_description", "Communications Platform as a Service" }
            });

        Console.WriteLine(endUser.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.EndUser;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        EndUser endUser = EndUser.creator("Twilio, Inc.", EndUser.Type.BUSINESS)
                              .setAttributes(new HashMap<String, Object>() {
                                  {
                                      put("business_name", "Twilio");
                                      put("vat", "2348132");
                                      put("business_description", "Communications Platform as a Service");
                                  }
                              })
                              .create();

        System.out.println(endUser.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	numbers "github.com/twilio/twilio-go/rest/numbers/v2"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &numbers.CreateEndUserParams{}
	params.SetFriendlyName("Twilio, Inc.")
	params.SetType("business")
	params.SetAttributes(map[string]interface{}{
		"business_name":        "Twilio",
		"vat":                  "2348132",
		"business_description": "Communications Platform as a Service",
	})

	resp, err := client.NumbersV2.CreateEndUser(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$end_user = $twilio->numbers->v2->regulatoryCompliance->endUsers->create(
    "Twilio, Inc.", // FriendlyName
    "business", // Type
    [
        "attributes" => [
            "business_name" => "Twilio",
            "vat" => "2348132",
            "business_description" => "Communications Platform as a Service",
        ],
    ]
);

print $end_user->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

end_user = @client
           .numbers
           .v2
           .regulatory_compliance
           .end_users
           .create(
             friendly_name: 'Twilio, Inc.',
             type: 'business',
             attributes: {
               'business_name' => 'Twilio',
               'vat' => '2348132',
               'business_description' => 'Communications Platform as a Service'
             }
           )

puts end_user.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:numbers:v2:regulatory-compliance:end-users:create \
   --friendly-name "Twilio, Inc." \
   --type business \
   --attributes "{\"business_name\":\"Twilio\",\"vat\":\"2348132\",\"business_description\":\"Communications Platform as a Service\"}"
```

```bash
ATTRIBUTES_OBJ=$(cat << EOF
{
  "business_name": "Twilio",
  "vat": "2348132",
  "business_description": "Communications Platform as a Service"
}
EOF
)
curl -X POST "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers" \
--data-urlencode "FriendlyName=Twilio, Inc." \
--data-urlencode "Type=business" \
--data-urlencode "Attributes=$ATTRIBUTES_OBJ" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "Twilio, Inc.",
  "type": "business",
  "attributes": {
    "business_name": "Twilio",
    "vat": "2348132",
    "business_description": "Communications Platform as a Service"
  },
  "date_created": "2019-07-30T21:57:45Z",
  "date_updated": "2019-07-30T21:57:45Z",
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## Fetch one end user instance

`GET https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/{Sid}`

### Path parameters

```json
[{"name":"Sid","in":"path","description":"The unique string created by Twilio to identify the End User resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^IT[0-9a-fA-F]{32}$"},"required":true}]
```

Fetch one end user Instance

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchEndUser() {
  const endUser = await client.numbers.v2.regulatoryCompliance
    .endUsers("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(endUser.sid);
}

fetchEndUser();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

end_user = client.numbers.v2.regulatory_compliance.end_users(
    "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).fetch()

print(end_user.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var endUser =
            await EndUserResource.FetchAsync(pathSid: "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(endUser.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.EndUser;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        EndUser endUser = EndUser.fetcher("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        System.out.println(endUser.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.NumbersV2.FetchEndUser("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$end_user = $twilio->numbers->v2->regulatoryCompliance
    ->endUsers("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $end_user->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

end_user = @client
           .numbers
           .v2
           .regulatory_compliance
           .end_users('ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
           .fetch

puts end_user.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:numbers:v2:regulatory-compliance:end-users:fetch \
   --sid ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "friendly_name",
  "type": "individual",
  "attributes": {
    "email": "foobar@twilio.com"
  },
  "date_created": "2019-07-30T21:57:45Z",
  "date_updated": "2019-07-30T21:57:45Z",
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## List all end users for one SID

`GET https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers`

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

List all end user instances for one SID

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listEndUser() {
  const endUsers = await client.numbers.v2.regulatoryCompliance.endUsers.list({
    limit: 20,
  });

  endUsers.forEach((e) => console.log(e.sid));
}

listEndUser();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

end_users = client.numbers.v2.regulatory_compliance.end_users.list(limit=20)

for record in end_users:
    print(record.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var endUsers = await EndUserResource.ReadAsync(limit: 20);

        foreach (var record in endUsers) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.EndUser;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<EndUser> endUsers = EndUser.reader().limit(20).read();

        for (EndUser record : endUsers) {
            System.out.println(record.getSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	numbers "github.com/twilio/twilio-go/rest/numbers/v2"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &numbers.ListEndUserParams{}
	params.SetLimit(20)

	resp, err := client.NumbersV2.ListEndUser(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$endUsers = $twilio->numbers->v2->regulatoryCompliance->endUsers->read(20);

foreach ($endUsers as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

end_users = @client
            .numbers
            .v2
            .regulatory_compliance
            .end_users
            .list(limit: 20)

end_users.each do |record|
   puts record.sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:numbers:v2:regulatory-compliance:end-users:list
```

```bash
curl -X GET "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "results": [],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "results"
  }
}
```

## Update one end user instance

`POST https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/{Sid}`

### Path parameters

```json
[{"name":"Sid","in":"path","description":"The unique string created by Twilio to identify the End User resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^IT[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"UpdateEndUserRequest","properties":{"FriendlyName":{"type":"string","description":"The string that you assigned to describe the resource."},"Attributes":{"description":"The set of parameters that are the attributes of the End User resource which are derived End User Types.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}}}},"examples":{"update":{"value":{"lang":"json","value":"{\n  \"FriendlyName\": \"friendly_name\",\n  \"Attributes\": \"{}\"\n}","meta":"","code":"{\n  \"FriendlyName\": \"friendly_name\",\n  \"Attributes\": \"{}\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"FriendlyName\"","#7EE787"],[":","#C9D1D9"]," ",["\"friendly_name\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Attributes\"","#7EE787"],[":","#C9D1D9"]," ",["\"{}\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Update one end user instance

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function updateEndUser() {
  const endUser = await client.numbers.v2.regulatoryCompliance
    .endUsers("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .update({
      attributes: {
        email: "foobar@twilio.com",
        first_name: "Jeff",
      },
      friendlyName: "Twilio",
    });

  console.log(endUser.sid);
}

updateEndUser();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

end_user = client.numbers.v2.regulatory_compliance.end_users(
    "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).update(
    attributes={"email": "foobar@twilio.com", "first_name": "Jeff"},
    friendly_name="Twilio",
)

print(end_user.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var endUser = await EndUserResource.UpdateAsync(
            attributes: new Dictionary<
                string,
                Object>() { { "email", "foobar@twilio.com" }, { "first_name", "Jeff" } },
            friendlyName: "Twilio",
            pathSid: "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(endUser.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.EndUser;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        EndUser endUser = EndUser.updater("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                              .setAttributes(new HashMap<String, Object>() {
                                  {
                                      put("email", "foobar@twilio.com");
                                      put("first_name", "Jeff");
                                  }
                              })
                              .setFriendlyName("Twilio")
                              .update();

        System.out.println(endUser.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	numbers "github.com/twilio/twilio-go/rest/numbers/v2"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &numbers.UpdateEndUserParams{}
	params.SetAttributes(map[string]interface{}{
		"email":      "foobar@twilio.com",
		"first_name": "Jeff",
	})
	params.SetFriendlyName("Twilio")

	resp, err := client.NumbersV2.UpdateEndUser("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$end_user = $twilio->numbers->v2->regulatoryCompliance
    ->endUsers("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->update([
        "attributes" => [
            "email" => "foobar@twilio.com",
            "first_name" => "Jeff",
        ],
        "friendlyName" => "Twilio",
    ]);

print $end_user->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

end_user = @client
           .numbers
           .v2
           .regulatory_compliance
           .end_users('ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
           .update(
             attributes: {
               'email' => 'foobar@twilio.com',
               'first_name' => 'Jeff'
             },
             friendly_name: 'Twilio'
           )

puts end_user.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:numbers:v2:regulatory-compliance:end-users:update \
   --sid ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --attributes "{\"email\":\"foobar@twilio.com\",\"first_name\":\"Jeff\"}" \
   --friendly-name Twilio
```

```bash
ATTRIBUTES_OBJ=$(cat << EOF
{
  "email": "foobar@twilio.com",
  "first_name": "Jeff"
}
EOF
)
curl -X POST "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
--data-urlencode "Attributes=$ATTRIBUTES_OBJ" \
--data-urlencode "FriendlyName=Twilio" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "Twilio",
  "type": "individual",
  "attributes": {
    "email": "foobar@twilio.com",
    "first_name": "Jeff"
  },
  "date_created": "2019-07-30T21:57:45Z",
  "date_updated": "2019-07-30T21:57:45Z",
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## Delete one end user instance

`DELETE https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/{Sid}`

### Path parameters

```json
[{"name":"Sid","in":"path","description":"The unique string created by Twilio to identify the End User resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^IT[0-9a-fA-F]{32}$"},"required":true}]
```

Delete one end user instance

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function deleteEndUser() {
  await client.numbers.v2.regulatoryCompliance
    .endUsers("ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .remove();
}

deleteEndUser();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

client.numbers.v2.regulatory_compliance.end_users(
    "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).delete()
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        await EndUserResource.DeleteAsync(pathSid: "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.EndUser;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        EndUser.deleter("ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete();
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	err := client.NumbersV2.DeleteEndUser("ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$twilio->numbers->v2->regulatoryCompliance
    ->endUsers("ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->delete();
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client
  .numbers
  .v2
  .regulatory_compliance
  .end_users('ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .delete
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:numbers:v2:regulatory-compliance:end-users:remove \
   --sid ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X DELETE "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

[reg-rsrc]: /docs/phone-numbers/regulatory/api/regulations

[endusertype-rsrc]: /docs/phone-numbers/regulatory/api/end-user-types

[item-assign-rsrc]: /docs/phone-numbers/regulatory/api/item-assignments

[reg-bundle-rsrc]: /docs/phone-numbers/regulatory/api/bundles

[sup-docs-rsrc]: /docs/phone-numbers/regulatory/api/supporting-documents
