Documentation Index Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
Use this file to discover all available pages before exploring further.
The Tally plugin handles incoming webhooks. Point your provider’s subscription URL at your Corsair HTTP handler (see Overview for setup context and the exact URL shape).
Webhook map
formResponse
formResponse (formResponse.formResponse)
HTTP handler setup
import { processWebhook } from "corsair" ;
import { corsair } from "@/server/corsair" ;
export async function POST ( request : Request ) {
const headers = Object . fromEntries ( request . headers );
const body = await request . json ();
const result = await processWebhook ( corsair , headers , body );
return result . response ;
}
Events
formResponse.formResponse
A new form response was submitted
Payload
Name Type Required Description eventIdstringYes — eventTypeFORM_RESPONSEYes — createdAtstringYes — dataobjectYes —
{
responseId ?: string ,
submissionId : string ,
respondentId ?: string | null ,
formId : string ,
formName ?: string ,
createdAt ?: string ,
fields : {
key : string ,
label ?: string ,
type ?: string ,
value ?: any ,
options ?: any [],
rows ?: any [],
columns ?: any []
}[]
}
{
eventId : string ,
eventType : FORM_RESPONSE ,
createdAt : string ,
data : {
responseId ?: string ,
submissionId : string ,
respondentId ?: string | null ,
formId : string ,
formName ?: string ,
createdAt ?: string ,
fields : {
key : string ,
label ?: string ,
type ?: string ,
value ?: any ,
options ?: any [],
rows ?: any [],
columns ?: any []
}[]
}
}
webhookHooks example
tally ({
webhookHooks: {
formResponse: {
formResponse: {
before ( ctx , args ) {
return { ctx , args };
},
after ( ctx , response ) {
},
},
},
},
})