Webhooks send an HTTPS POST to your endpoint when something happens, so you don't have to poll. Use cci.completed to get each result the moment a prospect finishes.
Create a webhook
POST/api/v1/webhooks
Registers an endpoint. Save the signing_secret: you'll use it to verify deliveries.
| Parameter | Type | Description |
|---|
| endpoint | string | Required. An https:// URL. |
| events | string[] | cci.completed and/or prospect.created. Defaults to ["cci.completed"]. |
curl -X POST 'https://corecapacitiesindex.com/api/v1/webhooks' \
-H 'Authorization: Bearer cci_123' \
-H 'Content-Type: application/json' \
-d '{
"endpoint": "https://example.com/webhooks/cci",
"events": [
"cci.completed"
]
}'
Response
{
"object": "webhook",
"id": "wh_1729900000000_p0o9i8",
"endpoint": "https://example.com/webhooks/cci",
"events": ["cci.completed"],
"status": "enabled",
"signing_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
"created_at": "2026-10-26T14:53:20.000Z",
"updated_at": null
}
List webhooks
GET/api/v1/webhooks
Lists your webhook endpoints.
| Parameter | Type | Description |
|---|
| limit | number | Items per page, 1–100. Defaults to 20. |
| after | string | Return items after this ID, for the next page. |
| before | string | Return items before this ID, for the previous page. |
curl 'https://corecapacitiesindex.com/api/v1/webhooks' \
-H 'Authorization: Bearer cci_123'
Response
{
"object": "list",
"has_more": false,
"data": [ {
"object": "webhook",
"id": "wh_1729900000000_p0o9i8",
"endpoint": "https://example.com/webhooks/cci",
"events": ["cci.completed"],
"status": "enabled",
"signing_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
"created_at": "2026-10-26T14:53:20.000Z",
"updated_at": null
} ]
}
Retrieve a webhook
GET/api/v1/webhooks/:id
Returns one webhook endpoint, including its signing secret.
curl 'https://corecapacitiesindex.com/api/v1/webhooks/wh_1729900000000_p0o9i8' \
-H 'Authorization: Bearer cci_123'
Response
{
"object": "webhook",
"id": "wh_1729900000000_p0o9i8",
"endpoint": "https://example.com/webhooks/cci",
"events": ["cci.completed"],
"status": "enabled",
"signing_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
"created_at": "2026-10-26T14:53:20.000Z",
"updated_at": null
}
Update a webhook
PATCH/api/v1/webhooks/:id
Changes the endpoint or events, or pauses deliveries with status: disabled.
| Parameter | Type | Description |
|---|
| endpoint | string | A new https:// URL. |
| events | string[] | The events to subscribe to. |
| status | string | enabled or disabled. |
curl -X PATCH 'https://corecapacitiesindex.com/api/v1/webhooks/wh_1729900000000_p0o9i8' \
-H 'Authorization: Bearer cci_123' \
-H 'Content-Type: application/json' \
-d '{
"status": "disabled"
}'
Response
{
"object": "webhook",
"id": "wh_1729900000000_p0o9i8",
"endpoint": "https://example.com/webhooks/cci",
"events": ["cci.completed"],
"status": "disabled",
"signing_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
"created_at": "2026-10-26T14:53:20.000Z",
"updated_at": null
}
Delete a webhook
DELETE/api/v1/webhooks/:id
Deletes the endpoint. Deliveries stop immediately.
curl -X DELETE 'https://corecapacitiesindex.com/api/v1/webhooks/wh_1729900000000_p0o9i8' \
-H 'Authorization: Bearer cci_123'
Response
{
"object": "webhook",
"id": "wh_1729900000000_p0o9i8",
"deleted": true
}
Send a test event
POST/api/v1/webhooks/:id/test
Sends a sample cci.completed event to the endpoint so you can check your handler.
curl -X POST 'https://corecapacitiesindex.com/api/v1/webhooks/wh_1729900000000_p0o9i8/test' \
-H 'Authorization: Bearer cci_123'
Response
{
"object": "webhook_delivery",
"id": "msg_5f1c0d9e2b7a4c3d8e6f1a2b",
"webhook_id": "wh_1729900000000_p0o9i8",
"status_code": 200,
"success": true
}
Event payloads
Each delivery is a JSON body with the event type and a data object. For cci.completed, data is the full result, the same object Retrieve a result returns. For prospect.created, it's the prospect.
cci.completed is sent once the result's report_markdown and report_sections are ready, usually within a minute or two of the prospect finishing. If it takes longer, the event is sent without them (null) and you can get them later from Retrieve a result.
{
"type": "cci.completed",
"created_at": "2026-10-26T15:08:21.000Z",
"data": {
"object": "cci_result",
"id": "result_1729900500000_a8f2c1",
"prospect_id": "contact_1729900000000_k3j9xq",
"prospect": {
"id": "contact_1729900000000_k3j9xq",
"email": "jordan.rivera@example.com",
"first_name": "Jordan",
"last_name": "Rivera"
},
"status": "valid",
"capacities": { "builder": 24, "merchant": 21, "innovator": 15, "banker": 12 },
"personality_types": {
"intuitive": 45, "independent": 39, "practical": 36,
"creative": 33, "community": 30, "cognitive": 33
},
"top_capacities": ["builder", "merchant"],
"profile_matches": [
{ "profile_id": "profile_1729800000000_x1y2z3", "profile_name": "Account executive", "priority": 1 },
{ "profile_id": "profile_1729800000001_q7w8e9", "profile_name": "Operations manager", "priority": 3 }
],
"snapshot": {
"name": "Builder/Merchant",
"summary": "Drives toward results and rallies people around a vision...",
"interview_questions": ["Tell me about a deal you pushed over the line..."]
},
"words": ["action", "vision", "results"],
"custom_responses": {
"q_1": { "label": "Years of sales experience", "response": "5" }
},
"result_url": "https://corecapacitiesindex.com/results/Xk29dPq1",
"prospect_result_url": "https://corecapacitiesindex.com/my-results/a91LmZ0p",
"report_markdown": "# Core Capacities Index™ Results: Jordan Rivera\n\nCCI™ assessment results for Jordan Rivera...",
"report_sections": [
{
"profile_id": "profile_1729800000000_x1y2z3",
"profile_name": "Account executive",
"priority": 1,
"assessment_analysis": "## Assessment Analysis\n\nAnalysis based on these results and the hiring profile.\n\n**Profile:** Account executive...",
"snapshot": "## Snapshot of a Builder / Merchant\n\nA summary of this capacity profile\n\n...",
"production_strengths": "## Likely Production Strengths\n\n- ...",
"support_needed": "## Support They'll Need\n\n- ...",
"retention_watchouts": "## Retention Watchouts\n\n- ...",
"support_plan": "## How to Support This Person\n\nPractical ways to manage and coach to this person's natural drivers.\n\n**Motivate with:** ...",
"interview_questions": "## Interview Questions\n\nThe questions most likely to draw revealing answers, chosen for these results and the selected profile\n\n1. ..."
}
],
"created_at": "2026-10-26T15:08:20.000Z",
"updated_at": null,
"invalidated_at": null
}
}
Respond with any 2xx status within 10 seconds. Deliveries that time out or get a 5xx or 429 response are retried twice. Each delivery has a unique webhook-id that stays the same across retries, so you can ignore duplicates.
Verifying signatures
Deliveries are signed with your endpoint's signing_secret using the Standard Webhooks scheme, so any Standard Webhooks library works too. Each request has three headers:
| Parameter | Type | Description |
|---|
| webhook-id | string | Unique delivery ID. |
| webhook-timestamp | string | Unix time in seconds when it was sent. |
| webhook-signature | string | v1, followed by a base64 HMAC-SHA256 of id.timestamp.body. |
// Next.js route handler: app/api/webhooks/cci/route.ts
import crypto from "node:crypto"
const SECRET = process.env.CCI_WEBHOOK_SECRET! // whsec_...
function isValid(payload: string, headers: Headers) {
const id = headers.get("webhook-id")
const timestamp = headers.get("webhook-timestamp")
const signatures = headers.get("webhook-signature") ?? ""
// Reject deliveries more than 5 minutes old
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false
const key = Buffer.from(SECRET.replace(/^whsec_/, ""), "base64")
const expected = crypto
.createHmac("sha256", key)
.update(`${id}.${timestamp}.${payload}`)
.digest("base64")
// The header can hold several space-separated signatures
return signatures.split(" ").some((entry) => {
const [version, signature] = entry.split(",")
return (
version === "v1" &&
signature?.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))
)
})
}
export async function POST(request: Request) {
const payload = await request.text() // the raw body, before JSON.parse
if (!isValid(payload, request.headers)) {
return new Response("Invalid signature", { status: 400 })
}
const event = JSON.parse(payload)
if (event.type === "cci.completed") {
const { prospect, profile_matches } = event.data
// Save the result to your ATS or CRM
}
return new Response("OK")
}