Create an Identity

    Creates a new Identity object.

    API Endpoint

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

    Arguments

    country_iso

    Required Country ISO 2 code of the identity proof

    alias

    Alias name of the address

    salutation

    Required Allowed values: Mr, Ms

    first_name

    Required First name of the user for whom the identity is created.

    last_name

    Required Second name of the user for whom the identity is created.

    birth_place

    Required Birthplace of the user for whom the identity is created.

    birth_date

    Required Birth date in yyyy-mm-dd format of the user for whom the identity is created.

    nationality

    Required Nationality of the user for whom the identity is created.

    id_nationality

    Required Nationality mentioned in the identity proof.

    id_issue_date

    Required Issue date in yyyy-mm-dd mentioned in the identity proof.

    business_name

    Business name of the user for whom the identity is created.

    id_type

    RequiredThe type of identity document — for example, “Passport”

    id_number

    Required The unique number on the identifier.

    address_line1

    Required Building name/number.

    address_line2

    Required Street name/number of the address.

    city

    Required City of the address.

    region

    Required Region of the address.

    postal_code

    Required Postal code of the address.

    Fiscal_identification_code

    The code is available for businesses alone and will be available for Spain mobile numbers. Return null if not present.

    Street_code

    Street code of the address. Return null if not present.

    Municipal_code

    Municipal code of the address. Return null if not present.

    subaccount

    The link to the subaccount resource associated with the application. If the application belongs to the main account, this field will be null.

    file

    A file to upload, which needs to be considered the proof of ID. Max. file Size = 5MB* File should be in JPG, PDF, or PNG format.

    phone_number_country string

    Required ISO 2 of the Phone Number

    number_type string

    Type of the phone number. This can be local, national, mobile, or toll-free.

    Response

    HTTP Status Code: 200

    {
    "api_id": "324a7dd8-0db2-11e4-8a4a-123140008edf",
    "message": "Your request has been accepted."
    }
    

    Example Request

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    
    import plivo
    
    client = plivo.RestClient('<auth_id>','<auth_token>')
    response = client.identities.create(
        country_iso='US',
        salutation='Mr',
        first_name='Bruce',
        last_name='Wayne',
        birth_place='Gotham City',
        birth_date='1900-01-01',
        nationality='FR',
        id_nationality='New Earth',
        id_issue_date='2018-01-01',
        id_type='passport',
        id_number='128163264',
        address_line1='128',
        address_line2='RUE DU COMMANDANT GUILBAUD',
        city='PARIS',
        region='PARIS',
        postal_code='75016', )
    print(response)
    
    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
    45
    46
    47
    48
    49
    
    /**
     * Example for Account Get
     */
    using System;
    using System.Collections.Generic;
    using Plivo;
    using Plivo.Exception;
    
    namespace PlivoExamples
    {
        internal class Program
        {
            public static void Main(string[] args)
            {
                var api = new PlivoApi("<auth_id>","<auth_token>");
                string fileName = "path/to/file.jpg";
                try
                {
                    var createResponse = api.Identity.Create(
                        countryIso: "US",
                        salutation: "Mr",
                        firstName: "Bruce",
                        lastName: "Wayne",
                        birthPlace: "New York",
                        birthDate: "1992-10-16",
                        nationality: "US",
                        idNationality: "American",
                        idIssueDate: "2012-12-01",
                        idType: "passport",
                        idNumber: "K8691234",
                        addressLine1: "128",
                        addressLine2: "1238",
                        alias: "BrucePassport",
                        fileToUpload: fileName,
                        callbackUrl: "https://callback.url",
                        city: "New York",
                        region: "New York",
                        postalCode: "10007"
                     );
    
                    Console.WriteLine(createResponse);
                }
                catch (PlivoRestException e)
                {
                    Console.WriteLine("Exception: " + e.Message);
                }
            }
        }
    }