Skip to content

Webhooks

SSH key collection sessions support these webhook events:

EventWhen it fires
new_connectionA user connects to the collection session.
key_collectedSSHVerify collects a public key from the connection.
status_changedThe session status changes, for example from pending to completed.

If a webhook has an empty events list, all collection events trigger it.

Every collection event payload contains:

FieldDescription
collect_session_idID of the collection session.
collect_session_external_idOptional external ID configured on the session.
collect_session_connection_identifierSSH username used to connect to the session.

These fields are nested inside the shared webhook envelope described in Webhooks.

The new_connection payload includes connection metadata:

{
"collect_session_id": "session_id",
"collect_session_external_id": "user_123",
"collect_session_connection_identifier": "connection_identifier",
"collect_session_connection_id": "connection_id",
"ip_address": "203.0.113.10",
"client_version": "SSH-2.0-OpenSSH_9.6"
}

The key_collected payload includes the collected key and fingerprints:

{
"collect_session_id": "session_id",
"collect_session_external_id": "user_123",
"collect_session_connection_identifier": "connection_identifier",
"collect_session_connection_id": "connection_id",
"collect_session_key_id": "key_id",
"public_key_ssh": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...",
"public_key_pem": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----",
"public_key_md5": "MD5:...",
"public_key_sha256": "SHA256:...",
"public_key_algorithm": "ssh-ed25519"
}

The status_changed payload includes the new session status:

{
"collect_session_id": "session_id",
"collect_session_external_id": "user_123",
"collect_session_connection_identifier": "connection_identifier",
"collect_session_status": "completed"
}