Pepvote Support Center

Create Webhook Endpoint

POST
/webhook-endpoints

Authorization

bearerAuth
AuthorizationBearer <token>

A key in the form pepvote_api_ followed by 32 hexadecimal characters.

In: header

Header Parameters

Idempotency-Keystring

Optional retry key. First successful response is stored for 24 hours.

  • Length: up to 255 characters
User-Agentstringrequired

Name and version of the calling integration. Required on every request.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

urlstringrequired

HTTPS URL that receives webhook deliveries. http://localhost is allowed for development.

  • Length: up to 2048 characters
descriptionstring

Free-text note shown in the dashboard.

  • Length: up to 200 characters
eventTypesarray<enum<string>>required

Event types this endpoint subscribes to.

  • Items: at least 1 item
  • Values:candidate.bulk_approved|candidate.bulk_deleted|candidate.created|candidate.imported|candidate.updated|group.bulk_deleted|group.created|group.imported|group.updated|invite.accepted|invite.revoked|invite.sent|payment.failed|payment.succeeded|plan.upgraded|plan.voter_limit_increased|position.bulk_deleted|position.created|position.imported|position.updated|pricing.candidate_registration_pricing_updated|pricing.quadratic_credit_pricing_updated|pricing.vote_pricing_updated|registration.candidate_registered|registration.candidate_registration_closed|registration.voter_registered|registration.voter_registration_closed|result.published|result.recount_completed|result.recount_started|sponsor.bulk_deleted|sponsor.created|sponsor.imported|sponsor.updated|vote.cast|vote.confirmed|vote.export_failed|vote.exported|vote.recount_completed|vote.recount_started|voter.bulk_approved|voter.bulk_deleted|voter.created|voter.export_failed|voter.exported|voter.import_failed|voter.imported|voter.reminder_sent|voter.updated|voting_event.created|voting_event.deleted|voting_event.ended|voting_event.locked|voting_event.started|voting_event.updated
votingEventCodestring

Scope the endpoint to one event by its code. Omit for an account-level endpoint that receives every event.

Response Body

application/json

curl -X POST "https://example.com/webhook-endpoints" \  -H "User-Agent: my-app/1.0" \  -H "Content-Type: application/json" \  -d '{    "url": "string",    "eventTypes": [      "candidate.bulk_approved"    ]  }'
{
  "data": {
    "id": "string",
    "votingEventId": "string",
    "url": "string",
    "description": "string",
    "eventTypes": [
      "candidate.bulk_approved"
    ],
    "status": "active",
    "disabledReason": "string",
    "consecutiveFailures": 0,
    "secretHint": "string",
    "createdAt": 0,
    "secret": "string"
  }
}
Was this helpful?

Last updated September 6, 2026