Priming
Batch import users
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/users/import" \ -H "Content-Type: application/json" \ -d '{ "users": [ { "user_id": "string" } ] }'{
"$schema": "/api/v1/schemas/BatchImportUsersHumaOutputBody.json",
"facts_created": 0,
"job_id": "string",
"status": "string",
"total_users": 0
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get batch import job status
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Import job UUID
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/users/import/string"{
"$schema": "/api/v1/schemas/ImportJob.json",
"agent_id": "string",
"completed_at": "2019-08-24T14:15:22Z",
"constellation_nodes": 0,
"created_at": "2019-08-24T14:15:22Z",
"error_details": null,
"errors": 0,
"facts_deduped": 0,
"facts_extracted": 0,
"facts_stored": 0,
"job_id": "string",
"job_type": "string",
"payload": null,
"processed_users": 0,
"source_id": "string",
"source_type": "string",
"started_at": "2019-08-24T14:15:22Z",
"status": "string",
"tenant_id": "string",
"total_users": 0,
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "string",
"warmth_score": 0
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}List per-user progress for a batch import job
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Import job UUID
Query Parameters
Max user rows to return
100int64Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/users/import/string/users"{
"$schema": "/api/v1/schemas/ListImportJobUsersOutputBody.json",
"count": 0,
"users": [
{
"completed_at": "2019-08-24T14:15:22Z",
"error_message": "string",
"facts_deduped": 0,
"facts_stored": 0,
"job_id": "string",
"started_at": "2019-08-24T14:15:22Z",
"status": "string",
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "string",
"warmth_score": 0
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}List import jobs for an agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Query Parameters
Max jobs to return
20int64Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/users/imports"{
"$schema": "/api/v1/schemas/ListImportJobsOutputBody.json",
"count": 0,
"jobs": [
{
"$schema": "/api/v1/schemas/ImportJob.json",
"agent_id": "string",
"completed_at": "2019-08-24T14:15:22Z",
"constellation_nodes": 0,
"created_at": "2019-08-24T14:15:22Z",
"error_details": null,
"errors": 0,
"facts_deduped": 0,
"facts_extracted": 0,
"facts_stored": 0,
"job_id": "string",
"job_type": "string",
"payload": null,
"processed_users": 0,
"source_id": "string",
"source_type": "string",
"started_at": "2019-08-24T14:15:22Z",
"status": "string",
"tenant_id": "string",
"total_users": 0,
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "string",
"warmth_score": 0
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Add content for a user
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
User ID to add content for
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/users/string/content" \ -H "Content-Type: application/json" \ -d '{ "content": [ { "body": "string", "type": "string" } ] }'{
"$schema": "/api/v1/schemas/AddUserContentHumaOutputBody.json",
"job_id": "string",
"status": "string"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get user priming metadata
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
User ID
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/users/string/metadata"{
"$schema": "/api/v1/schemas/UserPrimingMetadata.json",
"AgentID": "string",
"Company": "string",
"CreatedAt": "2019-08-24T14:15:22Z",
"CustomFields": {
"property1": "string",
"property2": "string"
},
"DisplayName": "string",
"Email": "string",
"FactsCount": 0,
"FirstMetAt": "2019-08-24T14:15:22Z",
"LinkedinURL": "string",
"Phone": "string",
"PrimedAt": "2019-08-24T14:15:22Z",
"SourceID": "string",
"SourceType": "string",
"Timezone": "string",
"Title": "string",
"UpdatedAt": "2019-08-24T14:15:22Z",
"UserID": "string",
"WarmthScore": 0
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Update user priming metadata
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
User ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X PATCH "https://loading/api/v1/agents/string/users/string/metadata" \ -H "Content-Type: application/json" \ -d '{}'{
"$schema": "/api/v1/schemas/UpdateUserMetadataHumaOutputBody.json",
"facts_created": 0,
"metadata": {
"$schema": "/api/v1/schemas/UserPrimingMetadata.json",
"AgentID": "string",
"Company": "string",
"CreatedAt": "2019-08-24T14:15:22Z",
"CustomFields": {
"property1": "string",
"property2": "string"
},
"DisplayName": "string",
"Email": "string",
"FactsCount": 0,
"FirstMetAt": "2019-08-24T14:15:22Z",
"LinkedinURL": "string",
"Phone": "string",
"PrimedAt": "2019-08-24T14:15:22Z",
"SourceID": "string",
"SourceType": "string",
"Timezone": "string",
"Title": "string",
"UpdatedAt": "2019-08-24T14:15:22Z",
"UserID": "string",
"WarmthScore": 0
}
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Prime a user with external data
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
User ID to prime
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/users/string/prime" \ -H "Content-Type: application/json" \ -d '{ "display_name": "string" }'{
"property1": null,
"property2": null
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get priming job status
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
User ID
Import job UUID
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/users/string/prime/string"{
"$schema": "/api/v1/schemas/ImportJob.json",
"agent_id": "string",
"completed_at": "2019-08-24T14:15:22Z",
"constellation_nodes": 0,
"created_at": "2019-08-24T14:15:22Z",
"error_details": null,
"errors": 0,
"facts_deduped": 0,
"facts_extracted": 0,
"facts_stored": 0,
"job_id": "string",
"job_type": "string",
"payload": null,
"processed_users": 0,
"source_id": "string",
"source_type": "string",
"started_at": "2019-08-24T14:15:22Z",
"status": "string",
"tenant_id": "string",
"total_users": 0,
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "string",
"warmth_score": 0
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}