Skip to main content

Reports

Report generation is async. Create a job, then use jobs endpoints or SDK handles to wait/stream.

Generated from contracts in packages/contracts/src/v1. Do not hand-edit this page.

POST /v1/reports/jobs

Create a report generation job.

Request schema

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"media": {
"type": "object",
"properties": {
"mediaId": {
"type": "string"
}
},
"required": [
"mediaId"
],
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"template": {
"type": "string",
"enum": [
"sales_playbook",
"general_report",
"hiring_report",
"profile_alignment"
]
},
"templateParams": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"template"
],
"additionalProperties": false
},
"target": {
"type": "object",
"properties": {
"strategy": {
"type": "string",
"enum": [
"dominant",
"timerange",
"entity_id",
"magic_hint"
]
},
"on_miss": {
"default": "error",
"type": "string",
"enum": [
"fallback_dominant",
"error"
]
},
"timerange": {
"anyOf": [
{
"type": "object",
"properties": {
"start_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"end_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"entity_id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 256
},
{
"type": "null"
}
]
}
},
"required": [
"strategy",
"on_miss"
],
"additionalProperties": false
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"entityLabel": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"webhook": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"headers": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"url"
],
"additionalProperties": false
},
"idempotencyKey": {
"type": "string"
}
},
"required": [
"media",
"output",
"target"
],
"additionalProperties": false
}

Response schema

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"jobId": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"queued",
"running"
]
},
"stage": {
"type": "string"
},
"estimatedWaitSec": {
"type": "number"
}
},
"required": [
"jobId",
"status"
],
"additionalProperties": false
}

GET /v1/reports/:reportId

Fetch a generated report by id.

Response schema

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"jobId": {
"type": "string"
},
"label": {
"type": "string"
},
"summary": {
"type": "string"
},
"media": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"mediaId": {
"type": "string"
}
},
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"template": {
"type": "string",
"enum": [
"sales_playbook",
"general_report",
"hiring_report",
"profile_alignment"
]
}
},
"required": [
"template"
],
"additionalProperties": false
},
"entity": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"label"
],
"additionalProperties": false
},
"markdown": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sections": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"section_title": {
"type": "string"
},
"section_content": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "card"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"icon",
"title",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "grid"
},
"columns": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "card"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"icon",
"title",
"content"
],
"additionalProperties": false
}
}
},
"required": [
"type",
"columns",
"items"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "illustration"
},
"variant": {
"type": "string",
"enum": [
"conversation",
"growth",
"connection",
"analysis"
]
}
},
"required": [
"type",
"variant"
],
"additionalProperties": false
}
]
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "card"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"icon",
"title",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "grid"
},
"columns": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "card"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"icon",
"title",
"content"
],
"additionalProperties": false
}
}
},
"required": [
"type",
"columns",
"items"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "illustration"
},
"variant": {
"type": "string",
"enum": [
"conversation",
"growth",
"connection",
"analysis"
]
}
},
"required": [
"type",
"variant"
],
"additionalProperties": false
}
]
}
},
{}
]
}
},
"required": [
"section_title",
"section_content"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"metrics": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"raw": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"pdfUrl": {
"type": "string",
"format": "uri"
},
"reportUrl": {
"type": "string",
"format": "uri"
}
},
"required": [
"id",
"createdAt",
"media",
"output"
],
"additionalProperties": false
}

GET /v1/reports/by-job/:jobId

Fetch a generated report by source job id.

  • Returns null until job reaches terminal success.

Response schema

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"jobId": {
"type": "string"
},
"label": {
"type": "string"
},
"summary": {
"type": "string"
},
"media": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"mediaId": {
"type": "string"
}
},
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"template": {
"type": "string",
"enum": [
"sales_playbook",
"general_report",
"hiring_report",
"profile_alignment"
]
}
},
"required": [
"template"
],
"additionalProperties": false
},
"entity": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"label"
],
"additionalProperties": false
},
"markdown": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sections": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"section_title": {
"type": "string"
},
"section_content": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "card"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"icon",
"title",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "grid"
},
"columns": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "card"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"icon",
"title",
"content"
],
"additionalProperties": false
}
}
},
"required": [
"type",
"columns",
"items"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "illustration"
},
"variant": {
"type": "string",
"enum": [
"conversation",
"growth",
"connection",
"analysis"
]
}
},
"required": [
"type",
"variant"
],
"additionalProperties": false
}
]
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "card"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"icon",
"title",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "grid"
},
"columns": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "card"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"icon",
"title",
"content"
],
"additionalProperties": false
}
}
},
"required": [
"type",
"columns",
"items"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "illustration"
},
"variant": {
"type": "string",
"enum": [
"conversation",
"growth",
"connection",
"analysis"
]
}
},
"required": [
"type",
"variant"
],
"additionalProperties": false
}
]
}
},
{}
]
}
},
"required": [
"section_title",
"section_content"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"metrics": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"raw": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"pdfUrl": {
"type": "string",
"format": "uri"
},
"reportUrl": {
"type": "string",
"format": "uri"
}
},
"required": [
"id",
"createdAt",
"media",
"output"
],
"additionalProperties": false
}