Creating Accounts

Overview

An Account is a single instance of an Account Type and can represent a unique user from within your system or service. There are a variety of methods in which an Account record can be created and most come alongside the natural ways in which businesses choose to integrate with Persona. This article describes the high-level ways in which you can create an Account and specify the Account Type.

Methods for creating an Account

1. As part of creating another Persona object via API

You can create an Account when you are creating a select set of Persona objects via API by using specific endpoints and specifying the creation of an Account in your API request.

By using the functionality within these endpoints, you’re able to simultaneously create an Account and associate the primary object to the Account as well.

Relevant objects and API endpoints

Some of the relevant objects and relevant API endpoints for this behavior include:

Specifying the creation of an Account in the API request

For the relevant API endpoints, you can ensure that an Account is created as part of the request by including the appropriate meta object information in the body of your API request. It’s recommended to use the above documentation from our API reference to review, test, and/or navigate toward our OpenAPI spec for further detail.

Example Create an Inquiry API request with create Account metadata

Using our API reference documentation, you can also draft your API requests. In the above example, we are attempting to create an Inquiry via API and are specifying the necessary values in the meta object of the request to simultaneously create an Account when the Inquiry is created as well as associated the two newly created objects.

The necessary values to specify in the meta object include:

auto-create-account : Specifying true marks the desire to create an Account alongside the primary object being created by the request.

auto-create-account-type-id: The Account Type ID should come from your Persona dashboard and indicates what Account Type should be created. For example, if you have two Account Types like User and Business, you will want to find the associated Account Type ID for the the Account Type you would like to make the record of. You can find all Account Type IDs by navigating to Accounts > Types in the dashboard.

auto-create-account-reference-id: It is highly recommended to set a Reference ID for each newly created Account. Reference IDs should be a unique string from your system or service that represents the unique record of the identity like a user ID.

2. Directly creating an Account via API

You can create an Account directly via API.

Relevant API endpoint

The relevant API endpoint to execute this request is:

Specifying the creation of an Account in the API request

Unlike the 1st method above, using the Create an Account endpoint directly creates an Account. Nonetheless there are additional values you should include in your request. It’s recommended to use the above documentation from our API reference to review, test, and/or navigate toward our OpenAPI spec for further detail.

The necessary values to specify in the data > attributes object include:

  • account-type-id: The Account Type ID should come from your Persona dashboard and indicates what Account Type should be created. For example, if you have two Account Types like User and Business, you will want to find the associated Account Type ID for the the Account Type you would like to make the record of. You can find all Account Type IDs by navigating to Accounts > Types in the dashboard.

3. Within a Workflow

You can also create an Account within a Workflow using different steps. Similar to the above methods, you may also need to specify the desired Account Types and/or Reference ID for the newly created Account.

Relevant Workflow Steps

Specifying the creation of an Account in the Workflow Step

Similar to the above methods, you may also need to specify the desired Account Types and/or Reference ID for the newly created Account. More detail on the available Step configurations can be found in the above Step-specific articles.

Related articles