Skip to main content

Matching

Matching follows the same job lifecycle as reports and can stream progress via jobs SSE.

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

POST /v1/matching/jobs

Create a matching job.

Request schema

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"group": {
"minItems": 1,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"type": {
"type": "string",
"const": "entity_id"
}
},
"required": [
"entityId",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"selector": {
"type": "object",
"properties": {
"entity_id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 256
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"on_miss": {
"default": "error",
"type": "string",
"enum": [
"fallback_dominant",
"error"
]
},
"strategy": {
"type": "string",
"enum": [
"dominant",
"timerange",
"entity_id",
"magic_hint"
]
},
"timerange": {
"anyOf": [
{
"type": "object",
"properties": {
"end_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"start_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"on_miss",
"strategy"
],
"additionalProperties": false
},
"type": {
"type": "string",
"const": "media_target"
}
},
"required": [
"mediaId",
"selector",
"type"
],
"additionalProperties": false
}
]
}
},
"target": {
"oneOf": [
{
"type": "object",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"type": {
"type": "string",
"const": "entity_id"
}
},
"required": [
"entityId",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"selector": {
"type": "object",
"properties": {
"entity_id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 256
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"on_miss": {
"default": "error",
"type": "string",
"enum": [
"fallback_dominant",
"error"
]
},
"strategy": {
"type": "string",
"enum": [
"dominant",
"timerange",
"entity_id",
"magic_hint"
]
},
"timerange": {
"anyOf": [
{
"type": "object",
"properties": {
"end_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"start_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"on_miss",
"strategy"
],
"additionalProperties": false
},
"type": {
"type": "string",
"const": "media_target"
}
},
"required": [
"mediaId",
"selector",
"type"
],
"additionalProperties": false
}
]
},
"context": {
"type": "string",
"const": "hiring_team_fit"
},
"idempotencyKey": {
"type": "string"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"webhook": {
"type": "object",
"properties": {
"headers": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"url": {
"type": "string",
"format": "uri"
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"required": [
"group",
"target",
"context"
],
"additionalProperties": false
}

Response schema

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

GET /v1/matching/:matchingId

Fetch a matching payload by id.

Response schema

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"context": {
"type": "string",
"const": "hiring_team_fit"
},
"createdAt": {
"type": "string"
},
"group": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"entityId": {
"type": "string"
},
"resolvedLabel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"oneOf": [
{
"type": "object",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"type": {
"type": "string",
"const": "entity_id"
}
},
"required": [
"entityId",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"selector": {
"type": "object",
"properties": {
"entity_id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 256
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"on_miss": {
"default": "error",
"type": "string",
"enum": [
"fallback_dominant",
"error"
]
},
"strategy": {
"type": "string",
"enum": [
"dominant",
"timerange",
"entity_id",
"magic_hint"
]
},
"timerange": {
"anyOf": [
{
"type": "object",
"properties": {
"end_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"start_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"on_miss",
"strategy"
],
"additionalProperties": false
},
"type": {
"type": "string",
"const": "media_target"
}
},
"required": [
"mediaId",
"selector",
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"source"
],
"additionalProperties": false
}
},
"id": {
"type": "string"
},
"json": {
"anyOf": [
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "number",
"const": 1
},
"sections": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"section_content": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"content": {
"type": "string"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "card"
}
},
"required": [
"content",
"icon",
"title",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"content": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "text"
}
},
"required": [
"content",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"columns": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "card"
}
},
"required": [
"content",
"icon",
"title",
"type"
],
"additionalProperties": false
}
},
"type": {
"type": "string",
"const": "grid"
}
},
"required": [
"columns",
"items",
"type"
],
"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": {
"content": {
"type": "string"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "card"
}
},
"required": [
"content",
"icon",
"title",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"content": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "text"
}
},
"required": [
"content",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"columns": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "card"
}
},
"required": [
"content",
"icon",
"title",
"type"
],
"additionalProperties": false
}
},
"type": {
"type": "string",
"const": "grid"
}
},
"required": [
"columns",
"items",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "illustration"
},
"variant": {
"type": "string",
"enum": [
"conversation",
"growth",
"connection",
"analysis"
]
}
},
"required": [
"type",
"variant"
],
"additionalProperties": false
}
]
}
},
{}
]
},
"section_title": {
"type": "string"
}
},
"required": [
"section_content",
"section_title"
],
"additionalProperties": false
}
},
"summary": {
"type": "string",
"minLength": 1
},
"title": {
"type": "string",
"minLength": 1
}
},
"required": [
"schemaVersion",
"sections",
"summary",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"jobId": {
"type": "string"
},
"label": {
"type": "string"
},
"markdown": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"output": {
"type": "object",
"properties": {
"template": {
"type": "string",
"const": "matching"
}
},
"required": [
"template"
],
"additionalProperties": false
},
"target": {
"type": "object",
"properties": {
"entityId": {
"type": "string"
},
"resolvedLabel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"oneOf": [
{
"type": "object",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"type": {
"type": "string",
"const": "entity_id"
}
},
"required": [
"entityId",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"selector": {
"type": "object",
"properties": {
"entity_id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 256
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"on_miss": {
"default": "error",
"type": "string",
"enum": [
"fallback_dominant",
"error"
]
},
"strategy": {
"type": "string",
"enum": [
"dominant",
"timerange",
"entity_id",
"magic_hint"
]
},
"timerange": {
"anyOf": [
{
"type": "object",
"properties": {
"end_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"start_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"on_miss",
"strategy"
],
"additionalProperties": false
},
"type": {
"type": "string",
"const": "media_target"
}
},
"required": [
"mediaId",
"selector",
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"source"
],
"additionalProperties": false
}
},
"required": [
"context",
"createdAt",
"group",
"id",
"output",
"target"
],
"additionalProperties": false
}

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

Fetch matching payload by job id.

  • Returns null until job reaches terminal success.

Response schema

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"context": {
"type": "string",
"const": "hiring_team_fit"
},
"createdAt": {
"type": "string"
},
"group": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"entityId": {
"type": "string"
},
"resolvedLabel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"oneOf": [
{
"type": "object",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"type": {
"type": "string",
"const": "entity_id"
}
},
"required": [
"entityId",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"selector": {
"type": "object",
"properties": {
"entity_id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 256
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"on_miss": {
"default": "error",
"type": "string",
"enum": [
"fallback_dominant",
"error"
]
},
"strategy": {
"type": "string",
"enum": [
"dominant",
"timerange",
"entity_id",
"magic_hint"
]
},
"timerange": {
"anyOf": [
{
"type": "object",
"properties": {
"end_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"start_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"on_miss",
"strategy"
],
"additionalProperties": false
},
"type": {
"type": "string",
"const": "media_target"
}
},
"required": [
"mediaId",
"selector",
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"source"
],
"additionalProperties": false
}
},
"id": {
"type": "string"
},
"json": {
"anyOf": [
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "number",
"const": 1
},
"sections": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"section_content": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"content": {
"type": "string"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "card"
}
},
"required": [
"content",
"icon",
"title",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"content": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "text"
}
},
"required": [
"content",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"columns": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "card"
}
},
"required": [
"content",
"icon",
"title",
"type"
],
"additionalProperties": false
}
},
"type": {
"type": "string",
"const": "grid"
}
},
"required": [
"columns",
"items",
"type"
],
"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": {
"content": {
"type": "string"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "card"
}
},
"required": [
"content",
"icon",
"title",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"content": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "text"
}
},
"required": [
"content",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"columns": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"const": "card"
}
},
"required": [
"content",
"icon",
"title",
"type"
],
"additionalProperties": false
}
},
"type": {
"type": "string",
"const": "grid"
}
},
"required": [
"columns",
"items",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "illustration"
},
"variant": {
"type": "string",
"enum": [
"conversation",
"growth",
"connection",
"analysis"
]
}
},
"required": [
"type",
"variant"
],
"additionalProperties": false
}
]
}
},
{}
]
},
"section_title": {
"type": "string"
}
},
"required": [
"section_content",
"section_title"
],
"additionalProperties": false
}
},
"summary": {
"type": "string",
"minLength": 1
},
"title": {
"type": "string",
"minLength": 1
}
},
"required": [
"schemaVersion",
"sections",
"summary",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"jobId": {
"type": "string"
},
"label": {
"type": "string"
},
"markdown": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"output": {
"type": "object",
"properties": {
"template": {
"type": "string",
"const": "matching"
}
},
"required": [
"template"
],
"additionalProperties": false
},
"target": {
"type": "object",
"properties": {
"entityId": {
"type": "string"
},
"resolvedLabel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"oneOf": [
{
"type": "object",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"type": {
"type": "string",
"const": "entity_id"
}
},
"required": [
"entityId",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"selector": {
"type": "object",
"properties": {
"entity_id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 256
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"on_miss": {
"default": "error",
"type": "string",
"enum": [
"fallback_dominant",
"error"
]
},
"strategy": {
"type": "string",
"enum": [
"dominant",
"timerange",
"entity_id",
"magic_hint"
]
},
"timerange": {
"anyOf": [
{
"type": "object",
"properties": {
"end_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"start_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"on_miss",
"strategy"
],
"additionalProperties": false
},
"type": {
"type": "string",
"const": "media_target"
}
},
"required": [
"mediaId",
"selector",
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"source"
],
"additionalProperties": false
}
},
"required": [
"context",
"createdAt",
"group",
"id",
"output",
"target"
],
"additionalProperties": false
}