Create persona set
https://api.faraday.ai/v1/persona_setsInvoke the build of a new persona set for a given cohort
Authentication
Provide your API key in the Authorization header. You can find your API key in the Settings page of the dashboard.
Authorization: Bearer YOUR_TOKENBody
Configuration parameters for the new persona model
"5bf9aa70-7bf1-4ef1-a131-8c84441be231"explorebooleanWhether to show the persona set in Explore, the map view on https://app.faraday.ai.
This will slow down persona set builds.
truemodeling_fieldsarray[string]Specify customer attributes to use in modeling
Human-readable label for this persona set.
"Customers personas"^(?!\s*$).+number_of_clustersintegerSpecify the exact number of clusters (i.e. personas) there should be in the persona set.
By default, the optimal value for this parameter is determined automatically.
Setting this requires external ...
previewbooleanA persona set in preview mode will not build until preview is turned off.
trueResponses
201The newly created persona set (still building)
activebooleanIs the related cohort using this as the primary persona set?
archived_atstring<date-time>If not null, this resource will no longer receive updates, but will still be visable.
"5bf9aa70-7bf1-4ef1-a131-8c84441be231"When this resource was created.
explorebooleanWhether to show the persona set in Explore, the map view on https://app.faraday.ai.
This will slow down persona set builds.
trueA unique ID for this resource.
"4b3f42dd-b6c3-4f0f-ac18-9e6e47321f83"last_read_input_atstring<date-time>The last time this resource's input was read.
last_updated_config_atstring<date-time>The last time this resource's configuration was updated. If this is more recent than last_updated_output_at, the resource will be rebuilt.
last_updated_output_atstring<date-time>The last time this resource successfully built.
modeling_fieldsarray[string]Specify customer attributes to use in modeling
Human-readable label for this persona set.
"Customers personas"^(?!\s*$).+number_of_clustersintegerSpecify the exact number of clusters (i.e. personas) there should be in the persona set.
By default, the optimal value for this parameter is determined automatically.
Setting this requires external ...
personasarray[object]The personas that belong to this persona set
previewbooleanA persona set in preview mode will not build until preview is turned off.
trueThe current state of this resource and any updates.
"pending"new, starting, running, ready, errorstatus_changed_atstring<date-time>When the status of this resource was last updated.
status_errorstringIf this resource has status == "error", this will contain an error message.
When this resource was last updated.
400The request was invalid.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICTA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
401No API key was supplied.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICTA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
403Access to this resource was forbidden.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICTA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
404The requested resource ID was not found.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICTA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
500An internal server error occurred.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICTA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
Tags
Test request
Request snippet
curl -X POST 'https://api.faraday.ai/v1/persona_sets' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"cohort_id": "5bf9aa70-7bf1-4ef1-a131-8c84441be231",
"explore": true,
"modeling_fields": [
"fig/actvty_num_purchase_quintile"
],
"name": "Customers personas",
"number_of_clusters": 0,
"preview": true
}'Example response
{
"active": true,
"archived_at": "2024-01-01T12:00:00Z",
"cohort_id": "5bf9aa70-7bf1-4ef1-a131-8c84441be231",
"created_at": "2024-01-01T12:00:00Z",
"explore": true,
"id": "4b3f42dd-b6c3-4f0f-ac18-9e6e47321f83",
"last_read_input_at": "2024-01-01T12:00:00Z",
"last_updated_config_at": "2024-01-01T12:00:00Z",
"last_updated_output_at": "2024-01-01T12:00:00Z",
"modeling_fields": [
"fig/actvty_num_purchase_quintile"
],
"name": "Customers personas",
"number_of_clusters": 0,
"personas": [
{
"avatar": "https://app.faraday.ai/images/persona_stereotypes/face-5.jpg",
"details": {
"bins": "{\n \"age\": [\n {\n \"max\": 20,\n \"min\": 0,\n \"count\": 0,\n \"percent\": 0.0\n },\n //...\n {\n \"max\": 30,\n \"min\": 20,\n \"count\": 6,\n \"percent\": 0.0035608308605341245\n },\n //...\n {\n \"max\": null,\n \"min\": 90,\n \"count\": 0,\n \"percent\": 0.0\n }\n ],\n \"gender\": [\n {\n \"count\": 1396,\n \"value\": \"Female\",\n \"percent\": 0.828486646884273\n },\n {\n \"count\": 289,\n \"value\": \"Male\",\n \"percent\": 0.171513353115727\n }\n ]\n //...\n}\n",
"center": "{\n \"age\": 38.98716,\n \"gender\": \"Female\",\n \"household_size\": 6.61248,\n \"household_income\": 148072.78481\n}\n"
},
"id": "5cc63c04-f451-43e4-98ce-0e755db8f8e6",
"individuals_count": 1000,
"interpretation": {
"marketing_strategems": [
"string"
],
"summary": "string"
},
"name": "Cluster 0"
}
],
"preview": true,
"resource_type": "persona_sets",
"status": "pending",
"status_changed_at": "2024-01-01T12:00:00Z",
"status_error": "string",
"updated_at": "2024-01-01T12:00:00Z"
}