Identities

Create identity

Create a new identity with the Go SDK.

POST/identities

Use client.Identity.Create to create an identity for an individual or organization.

Call the method

dob, _ := time.Parse(time.RFC3339, "1990-01-15T00:00:00Z")

identity, _, _ := client.Identity.Create(blnkgo.Identity{
	IdentityType: blnkgo.Individual,
	FirstName: "Alice",
	LastName: "Smith",
	EmailAddress: "[email protected]",
	DOB: &dob,
	MetaData: blnkgo.MetaData{
		"customer_id": "CUST123456",
	},
})
FieldTypeDescription
IdentityTypeblnkgo.IdentityTypeIndividual or Organization.

Response

{
  "identity_id": "idt_a8f2c91d-4b3c-4ef4-9ab1-a0decf3d0aa3",
  "identity_type": "individual",
  "first_name": "Alice",
  "last_name": "Smith",
  "email_address": "[email protected]",
  "phone_number": "+1234567890",
  "nationality": "Canadian",
  "category": "customer",
  "created_at": "2024-11-26T08:36:36.238244338Z",
  "meta_data": {
    "customer_id": "CUST123456"
  }
}

Go response (*blnkgo.IdentityResponse)

FieldTypeDescription
IdentityIdstringUnique ID for the identity.
IdentityTypeblnkgo.IdentityTypeType you passed in the request.
FirstNamestringFirst name of the individual.
LastNamestringLast name of the individual.
EmailAddressstringEmail address.
CreatedAtstringDate and time the identity was created.
MetaDataMetaDataMetadata stored with the identity.