> ## Documentation Index
> Fetch the complete documentation index at: https://support.rallly.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Invite someone to a poll

> Invites one person to an open poll by email and responds with `201 Created` and the invite. The poll must belong to the space associated with the API key.

Each invitee gets a personal `inviteUrl`. A response made through it is tied to the invite, and the form starts with the invitee's email and, when you pass one, their `name` filled in. They can still change both.

Rallly emails the link on the space owner's behalf and counts it against the space owner's daily invite limit and the space's monthly invites, as invites sent from the app are. When the space sends participant emails itself, nothing is emailed, neither limit applies, and you deliver `inviteUrl` yourself.

An address gets one pending invite per poll: inviting it again fails with `ALREADY_INVITED`. An invite removed in the app can be sent again; it gets a new link and the old one stops working.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/polls/{pollId}/invites
openapi: 3.1.0
info:
  title: Rallly API
  description: >-
    ## Versioning


    `v1` is stable. Additive changes (new endpoints, new optional fields) may
    land on this path at any time; breaking changes only arrive under a new
    version prefix.


    ## Rate limits


    All endpoints share two limits per space: **60 requests per minute** and
    **5000 requests per day**. Both are fixed windows that open with the first
    request and reset when they expire. Both limits are per space, not per API
    key, so creating additional keys does not increase throughput.


    Every response from an authenticated request includes the standard
    `RateLimit-*` headers. Responses sent before the limiter runs (`401`, `403`,
    and the maintenance `503`) do not. `RateLimit-Policy` lists both limits;
    `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` describe
    whichever limit is closest to being exhausted. When either limit is exceeded
    the API responds with `429 Too Many Requests`, a `RATE_LIMIT_EXCEEDED` error
    body, and a `Retry-After` header indicating how many seconds to wait before
    retrying.


    If the rate limit store cannot be reached the API fails closed and responds
    with `503 Service Unavailable`, a `SERVICE_UNAVAILABLE` error body, and a
    `Retry-After` header.


    ## Poll quota


    Polls created through the API count against a monthly quota per space, which
    resets at the start of each calendar month in UTC. Every `POST /polls`
    response that passes authentication and the rate limit includes
    `X-Poll-Quota-Limit`, `X-Poll-Quota-Used` and `X-Poll-Quota-Reset` (an ISO
    8601 instant in UTC). Requests that fail validation are not counted, and
    deleting a poll does not give its slot back. When the quota is used up,
    `POST /polls` responds with `429 Too Many Requests`, a `POLL_QUOTA_EXCEEDED`
    error body, and a `Retry-After` header with the seconds until the reset. The
    space owner can raise the quota from the API keys settings page.


    ## Dates and times


    Every poll has a `kind`. A `date` poll offers calendar days: each option
    carries a `date` in `YYYY-MM-DD` format, which is a floating date with no
    time component and no timezone, so never convert it through a timezone. A
    `time` poll offers time slots: each option carries a `startTime` as an ISO
    8601 instant in UTC and a `duration` in minutes; convert `startTime` into
    the poll's `timeZone` (or the viewer's) for display. Timestamps such as
    `createdAt` and `updatedAt` are always ISO 8601 instants in UTC.


    ## Request bodies


    Request bodies are validated strictly: a field that is not part of the
    documented schema is rejected with `VALIDATION_ERROR` rather than ignored,
    so a misspelt setting never silently falls back to its default.


    ## Enums


    Vote types are an open set. The built-in values are `yes`, `ifNeedBe` and
    `no`; new types may be added without a version change, so clients must
    tolerate values they do not recognise. `status` and `kind` are closed sets.


    ## Lists


    List endpoints return the items in `data`. `GET /polls` is paginated: it
    returns a `nextCursor` beside `data`; pass it as the `cursor` query
    parameter to fetch the next page, and it is `null` on the last page. `GET
    /polls/:pollId/participants` returns every participant in one response.


    ## Errors


    Every failure is `application/json` with the shape `{ "error": { "code",
    "message" } }`. `code` is stable and safe to branch on; `message` is
    human-readable and may change. `VALIDATION_ERROR` messages name each
    offending field.


    | Status | Code | When |

    | --- | --- | --- |

    | 400 | `VALIDATION_ERROR` | The body or query string did not match the
    schema, contained an unknown field, or the body was not valid JSON |

    | 400 | `INVALID_AUTHORIZATION_HEADER` | The `Authorization` header is not
    `Bearer <key>` |

    | 400 | `ORGANIZER_NOT_MEMBER` | The organizer email is not a member of the
    space |

    | 400 | `TOO_MANY_OPTIONS` | More than the maximum number of poll options |

    | 400 | `CONFERENCING_UNAVAILABLE` | The requested video call provider is
    not offered on this instance |

    | 400 | `CONFERENCING_NOT_CONNECTED` | The organizer has not connected an
    account for the requested video call provider |

    | 400 | `INAPPROPRIATE_CONTENT` | The title, description, location or video
    call was flagged by content moderation |

    | 401 | `UNAUTHORIZED` | The API key is missing, invalid, expired or
    revoked, or its owner is banned |

    | 403 | `SPACE_NOT_PRO` | The space behind the key has no Pro subscription |

    | 404 | `NOT_FOUND` | No route matches the method and path |

    | 404 | `POLL_NOT_FOUND` | The poll does not exist or belongs to another
    space |

    | 404 | `PARTICIPANT_NOT_FOUND` | The participant does not exist or belongs
    to another poll |

    | 409 | `POLL_NOT_OPEN` | The poll is closed, scheduled or canceled, so it
    takes no new invites |

    | 409 | `ALREADY_INVITED` | The address already has a pending invite to the
    poll |

    | 409 | `ALREADY_RESPONDED` | Someone with the address has already responded
    to the poll |

    | 429 | `RATE_LIMIT_EXCEEDED` | A rate limit window is exhausted |

    | 429 | `INVITE_LIMIT_EXCEEDED` | The space owner has sent the most invites
    allowed in 24 hours, or the space has used its monthly invites |

    | 429 | `POLL_QUOTA_EXCEEDED` | The space has used its monthly API poll
    quota |

    | 502 | `INVITE_EMAIL_FAILED` | The invite email could not be sent; no
    invite was created |

    | 503 | `SERVICE_UNAVAILABLE` | Maintenance, or the rate limit store cannot
    be reached |

    | 500 | `INTERNAL_ERROR` | Unexpected failure; the request id is logged |
  version: 1.0.0
servers:
  - url: https://api.rallly.co
security: []
paths:
  /v1/polls/{pollId}/invites:
    post:
      tags:
        - Polls
      summary: Invite someone to a poll
      description: >-
        Invites one person to an open poll by email and responds with `201
        Created` and the invite. The poll must belong to the space associated
        with the API key.


        Each invitee gets a personal `inviteUrl`. A response made through it is
        tied to the invite, and the form starts with the invitee's email and,
        when you pass one, their `name` filled in. They can still change both.


        Rallly emails the link on the space owner's behalf and counts it against
        the space owner's daily invite limit and the space's monthly invites, as
        invites sent from the app are. When the space sends participant emails
        itself, nothing is emailed, neither limit applies, and you deliver
        `inviteUrl` yourself.


        An address gets one pending invite per poll: inviting it again fails
        with `ALREADY_INVITED`. An invite removed in the app can be sent again;
        it gets a new link and the old one stops working.
      operationId: postV1PollsByPollIdInvites
      parameters:
        - schema:
            type: string
          in: path
          name: pollId
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePollInviteInput'
      responses:
        '201':
          description: Invite created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePollInviteResponse'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: >-
            The API key is missing, invalid, expired or revoked, or its owner is
            banned. Includes a `WWW-Authenticate` header.
          headers:
            WWW-Authenticate:
              description: The bearer challenge, per RFC 6750.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            The space associated with the API key does not have a Pro
            subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Poll not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            The poll is not open (`POLL_NOT_OPEN`), the address already has a
            pending invite (`ALREADY_INVITED`), or someone with the address has
            already responded (`ALREADY_RESPONDED`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Rate limit exceeded (`RATE_LIMIT_EXCEEDED`), or the space owner's
            daily invites or the space's monthly invites are used up
            (`INVITE_LIMIT_EXCEEDED`). Invite limits apply only when Rallly
            emails the invite.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: >-
            The invite email could not be sent (`INVITE_EMAIL_FAILED`). No
            invite was created, so the request can be retried.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            The API is temporarily unavailable, for maintenance or because the
            rate limit store cannot be reached. Includes a `Retry-After` header.
            Maintenance responses are sent before the rate limiter runs and
            carry no `RateLimit-*` headers.
          headers:
            Retry-After:
              description: Seconds to wait before retrying the request.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CreatePollInviteInput:
      type: object
      properties:
        email:
          description: >-
            The invitee's email address. Compared case insensitively, so a poll
            has at most one invite per address.
          example: alex@example.com
          type: string
        name:
          description: >-
            What to call the invitee. When their personal link is opened, it
            fills in the name on their response; they can still change it. Blank
            is treated as no name.
          example: Alex Kim
          type: string
          maxLength: 100
      required:
        - email
      additionalProperties: false
    CreatePollInviteResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PollInvite'
      required:
        - data
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Machine-readable error code. The full list is in the API
                description.
              example: VALIDATION_ERROR
            message:
              type: string
              description: >-
                Human-readable explanation. For `VALIDATION_ERROR` it names each
                offending field, e.g. `title: Invalid input: expected string,
                received undefined; dates.0: Invalid ISO date`.
              example: 'title: Invalid input: expected string, received undefined'
          required:
            - code
            - message
      required:
        - error
    PollInvite:
      type: object
      properties:
        id:
          type: string
          example: cm5h8x2k40002q9l4e5f6a7b8
        pollId:
          type: string
          example: Xk3pQ9vLm2Ab
        email:
          type: string
          example: alex@example.com
        name:
          example: Alex Kim
          type:
            - string
            - 'null'
        inviteUrl:
          type: string
          description: >-
            The invitee's personal link. A response made through it is tied to
            this invite and starts with their name and email filled in. Anyone
            holding it can respond as the invitee, so share it only with them.
          example: https://rallly.co/invite/Xk3pQ9vLm2Ab?token=abc123
        createdAt:
          type: string
          format: date-time
          example: '2025-01-10T12:00:00.000Z'
      required:
        - id
        - pollId
        - email
        - name
        - inviteUrl
        - createdAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.