Create a profile

    This API allows you to create a business profile for your end customers.

    API Endpoint

    POST https://api.plivo.com/v1/Account/{auth_id}/Profile/

    Arguments

    profile_aliasstringRequired

    A friendly name for your profile.

    customer_typestringRequired

    Indicate the nature of your operations.

    Allowed values: DIRECT & RESELLER.

    Select RESELLER if your business provides communication services like messaging & voice calling to other businesses.

    entity_typestringRequired

    Indicates ownership of your company.

    Allowed values: PRIVATE, PUBLIC, NON_PROFIT, GOVERNMENT, INDIVIDUAL.

    company_namestringRequired

    Legal name of your company.

    vertical stringRequired

    Indicates the industry of your operations.

    Allowed values: PROFESSIONAL, REAL_ESTATE, HEALTHCARE, HUMAN_RESOURCES, ENERGY,ENTERTAINMENT, RETAIL, TRANSPORTATION,AGRICULTURE,INSURANCE,POSTAL,EDUCATION,HOSPITALITY, FINANCIAL, POLITICAL, GAMBLING, LEGAL, CONSTRUCTION, NGO, MANUFACTURING, GOVERNMENT, TECHNOLOGY, COMMUNICATION

    ein integer

    Your employer identification number. This will typically be found in your business registration document.

    Plivo strongly recommends providing ein if your company is registered. This will unlock premium features like high throughput for Plivo products.

    ein_issuing_countrystring

    Valid country ISO code which has issued ein.

    address objectRequired

    Valid postal address of the company.

    {
    "street": "",
    "city": "",
    "state": "",
    "postal_code": "",
    "country": ""

    }

    Guidelines:

    The field street is free form.
    city: Must be a valid city name, e.g. New York.
    state: Must be state code, e.g. TX for Texas.
    postal_code: Valid Zip-code.
    country: Valid country ISO code.
    authorized_contact objectRequired

    Authorized contact details of the person at the company.

    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "title": "Mr",
    "seniority": "admin",

    "phone": ""

    Guidelines:

    Fields, first_name & last_name are free form.

    email: Must be a valid email.
    title: Salutation of the contact at the given company.
    seniority: DIRECTOR,GM,VP,CEO,CFO,GENERAL_COUNSEL,OTHER.
    phone: Should be in E.164 format.
    stock_symbol string

    Stock symbol of your company.

    stock_exchange enum

    Stock exchange where your company is listed.

    Allowed values: NASDAQ, NYSE, AMEX, AMX, ASX, B3, BME, BSE, FRA, ICEX ,JPX, JSE, KRX ,LON, NSE, OMX, SEHK, SGX, SSE, STO, SWX, SZSE, TSX ,TWSE, VSE, OTHER

    alt_business_id string

    Alternate business identification number.

    alt_business_id_type enum

    Alternate business id type.

    Allowed values: DUNS, LEI, GIIN, NONE

    website string

    Valid website representing your business.

    plivo_subaccount string

    Sub-account mapped to the profile.

    Create a profile - Individuals

    You can use the above API by specifying entity_type=INDIVIDUAL. In that case you can skip fields like ein, ein_issuing_country, stock_symbol, stock_exchange, alt_business_id, alt_business_id_type.

    Returns

    api_id for the request, unique profile_uuid and success message

    Response

    HTTP Status Code: 200

    {
        "api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
        "message": "Profile created successfully.",
        "profile_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    
    // Available in versions >= 4.30.0 (https://github.com/plivo/plivo-node/releases/tag/v4.30.0)
    
    let plivo = require('plivo');
    
    var authorized_contact = {
        "first_name": "Hello",
        "last_name": "Test",
        "email": "john@example.com",
        "title": "John",
        "seniority": "admin",
        "phone": "+14156667777"
    }
    var address = {
        "street": "123",
        "city": "Band",
        "state": "NY",
        "postal_code": "10001",
        "country": "US"
    }
    var client = new plivo.Client("<auth_id>", "<auth_token>");
    client.profile.create(
        "my_profile", // profile_alias
        "SAXXXXXXXXXXXXXXXXMS", // plivo_subaccount 
        "DIRECT", // customer_type
        "GOVERNMENT", // entity_type
        "ABC Inc", // compnay_name
        "111111111", // ein
        "PROFESSIONAL", // vertical
        "US", // ein_issuing_country
        "ABC", // stock_symbol
        "NASDAQ", // stock exchange
        "NONE", // alt_business_id_type
        "google.com", // website
        address,
        authorized_contact)
        .then(function (response) {
            console.log(response);
        })
        .catch(function (error) {
            console.log(error);
        });
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    
    <?php
    
    # Available in versions >= 4.29.0 (https://github.com/plivo/plivo-php/releases/tag/v4.29.0)
    
    require '/etc/plivo-php/vendor/autoload.php';
    use Plivo\RestClient;
    
    $client = new RestClient("<auth_id>", "<auth_token>");
    
    $client
        ->client
        ->setTimeout(60);
    try
    {
        $authorized_contact = array(
            "first_name" => "Hello",
            "last_name" => "Test",
            "email" => "vishnu@plivo.com",
            "title" => "bro",
            "seniority" => "admin"
        );
        $address = array(
            "street" => "123",
            "city" => "Band",
            "state" => "NY",
            "postal_code" => "10001",
            "country" => "US"
        );
        $res = $client
            ->profile
            ->create("vishnu104", "", "DIRECT", "GOVERNMENT", "ABC Inc", "111111111", "PROFESSIONAL", "US", "ABC", "NASDAQ", "NONE", "google.com", $address, $authorized_contact);
        print_r($res);
    }
    catch(PlivoRestException $ex)
    {
        print_r($ex);
    }
    
    ?>
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    
    // Available in versions >= 5.9.0 (https://github.com/plivo/plivo-dotnet/releases/tag/v5.9.0)
    
    using System;
    using System.Collections.Generic;
    using Plivo;
    using Plivo.Exception;
    using Plivo.Resource.Profile;
    
    namespace dotnet_project
    {
        class Ten_dlc
        {
            static void Main(string[] args)
            {
    
                var api = new PlivoApi("<auth_id>", "<auth_token>");
    
                // Create a Profile
                try
                {
                    AuthorizedContact contact = new AuthorizedContact();
                    contact.Email = "john@example.com";
                    contact.Phone = "9019074079045";
                    contact.FirstName = "first name";
                    contact.LastName = "last name";
                    contact.Seniority = "none";
                    contact.Title = "Mr";
                    Address address = new Address();
                    address.Street = "street name";
                    address.City = "New York";
                    address.PostalCode = "560077";
                    address.Country = "US";
                    var response = api.Profile.Create("john_profile_1", "", "RESELLER", "PUBLIC", "Company Name Inc",
                    "111111111", "PROFESSIONAL", "US", "ABC", "NASDAQ", "www.webistename.com", "NONE", contact, address);
                    Console.WriteLine(response);
                }
                catch (PlivoRestException e)
                {
                    Console.WriteLine("Exception: " + e.Message);
                }
    
            }
        }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    
    curl -i --user auth_id:auth_token \
        -H 'Content-Type: application/json' \
        -d '{
            "profile_alias": "john_new",
            "customer_type": "reseller",
            "entity_type": "public",
            "company_name": "ABC Inc.12345",
            "vertical": "Entertainment",
            "plivo_subaccount" :"SAXXXXXXXXXXXXXXXXMM",
            "ein": "122321231",
            "ein_issuing_country":"US", 
            "address": {
                "street": "123",
                "city": "New York",
                "state": "NY",
                "postal_code": "10001",
                "country": "US"
            },
            "stock_symbol": "TESLA",
            "stock_exchange": "NYSE",
            "alt_business_id_type": "DUNS",
            "alt_business_id": "ABC",
            "website": "hibye.com",
            "authorized_contact": {
                "first_name": "john",
                "last_name": "doe",
                "email": "johndoe@example.com",
                "title": "Doe",
                "seniority": "admin",
                "phone": "14156667777"
            }
        
        }' \
        https://api.plivo.com/v1/Account/{auth_id}/Profile/