Pepvote Support Center

Create Invites

POST
/voting-events/{idOrCode}/invites

Invite up to 200 email addresses to one role. Emails already invited to that role are skipped. An event holds at most 2,000 official invites across managers, polling officers, and observers, revoked invites included. A request that would pass that cap fails with 422 and creates nothing.

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.

Path Parameters

idOrCodestringrequired

Voting event ID or code.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

emailsarray<string>required

Email addresses to invite, up to 200 per request.

  • Items: 1 to 200 items
roleenum<string>required

Collaborator role granted by the invite: manager, polling_officer, or observer.

  • Values:manager|polling_officer|observer

Response Body

application/json

application/json

curl -X POST "https://example.com/voting-events/string/invites" \  -H "User-Agent: my-app/1.0" \  -H "Content-Type: application/json" \  -d '{    "emails": [      "string"    ],    "role": "manager"  }'
{
  "data": {
    "invitedCount": 0,
    "skippedEmails": [
      "string"
    ],
    "invites": [
      {
        "id": "string",
        "votingEventId": "string",
        "email": "string",
        "role": "manager",
        "status": "string",
        "accepted": true,
        "createdAt": 0
      }
    ]
  }
}
{
  "error": {
    "code": "bad_request",
    "message": "string",
    "details": {
      "field": "string",
      "parameter": "string",
      "limit": 0,
      "retryAfterSeconds": 0,
      "feature": "string",
      "plan": "string"
    }
  }
}
Was this helpful?

Last updated October 16, 2026