POST
/
api
/
create_customer
/

This endpoint gets or creates a new customer. If a customer with the given provided_id does not exist, a new customer will be created. The response contains the created or already-existing customer and a flag denoting whether a new customer was created.

Body

name
string

The display name of your customer in Explo.

provided_id
string

The ID you use to identify this customer in your database. This is also the ID you will use to reference your customer in Explo queries or access your customer via the API. For more information on example usage, check out this section.

mapping
JSON | null

A set of key-values pairs that map a schema id to the data source that this customer loads data from. For more information on schemas and data sources, check out this section.

is_demo_group
boolean

A boolean representing whether this customer is a “demo customer.” Setting this to true will make data panels include a demo watermark for the customer. Demo customers do not count towards paid customers. Default value is false.

emails
string[]

An array of email addresses to add to the customer.

group_tags
string[] | null

An array of group tag names to assign to the customer. Group tag names must be of existing group tags, and these can be created with the create_group_tag endpoint.

hierarchy_level_name
string | null

The name of the hierarchy level to assign to the customer. Must be an existing hierarchy level. If no level is specified, the created customer will be assigned to the root (highest) level of the hierarchy. If you do not have a hierarchy set up and would like one, reach out to customer support.

parent_provided_id
string

An identifier for a parent customer matching the parent’s provided_id. If provided, the customer will be set as a child of the parent customer, and will have its computed_properties and computed_parent_schema_datasource_mapping fields inherit values from the parent customer. Parents must belong to the same data visibility group as their children. Parents must also be at a strictly higher hierarchy level than their children, so you’ll need to explicitly set the hierarchy_level_name to be at a level below the parent’s level. You can contact customer support to set up a hierarchy for your customers.

properties
JSON | Null

A set of key-value pairs assigned to this customer. These will be accessible through variables in the dashboards and SQL editor. More information on properties can be found in this section.

Response

success
number

Indicates whether the call was successful. 1 if successful, 0 if not.

new_customer
boolean

Indicates whether a new customer was created.

customer
object

The contents of the customer