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

# Get invitation



## OpenAPI

````yaml /openapi.json get /v1/invitations/{invitationId}
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    location requests, and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url,
    location_request, reaction, template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram/Messenger)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/invitations/{invitationId}:
    get:
      summary: Get invitation
      operationId: getInvitation
      parameters:
        - $ref: '#/components/parameters/InvitationIdParam'
      responses:
        '200':
          description: Invitation details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvitationResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Invitation not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    InvitationIdParam:
      name: invitationId
      in: path
      required: true
      schema:
        type: string
  schemas:
    InvitationResponse:
      type: object
      required:
        - invitation
      properties:
        invitation:
          $ref: '#/components/schemas/Invitation'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    Invitation:
      type: object
      required:
        - id
        - url
        - token
        - status
        - expiresAt
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          example: inv_abc123
        url:
          type: string
          description: Full URL to share with the client.
          example: https://dashboard.zavu.dev/invite/abc123xyz
        token:
          type: string
          description: Unique invitation token.
        clientName:
          type: string
          nullable: true
        clientEmail:
          type: string
          nullable: true
        clientPhone:
          type: string
          nullable: true
        phoneNumberId:
          type: string
          nullable: true
          description: >-
            ID of a pre-assigned Zavu phone number for WhatsApp registration.
            Always null for `messenger` invitations.
        connectionType:
          type: string
          enum:
            - whatsapp_waba
            - messenger
          description: >-
            Which Meta channel the client connects: `whatsapp_waba` (official
            WhatsApp Cloud API via embedded signup) or `messenger` (a Facebook
            Page's Messenger inbox, including Marketplace chats).
        status:
          $ref: '#/components/schemas/InvitationStatus'
        senderId:
          type: string
          nullable: true
          description: ID of the sender created when invitation is completed.
        connectedAccount:
          type: object
          nullable: true
          description: >-
            The account the client linked, populated once the invitation is
            `completed`. Null before that. Use it to show the partner what was
            connected without fetching the sender.
          required:
            - channel
            - id
          properties:
            channel:
              type: string
              enum:
                - whatsapp
                - messenger
            id:
              type: string
              description: >-
                Provider-side identifier: the WhatsApp phone number ID, or the
                Facebook Page ID.
            name:
              type: string
              nullable: true
              description: >-
                Display name of the connected account: the WhatsApp verified
                name, or the Facebook Page name.
        failureReason:
          type: string
          nullable: true
          description: >-
            Stable code for why the last attempt failed, present when `status`
            is `failed`. Values include `fb_cancelled` (client closed Meta's
            dialog), `fb_not_authorized` (permission denied), `signup_abandoned`
            (started but never finished), `meta_no_pages` (the client
            administers no Facebook Page), and `internal_error`. Treat unknown
            codes as a generic failure.
        failedAt:
          type: string
          format: date-time
          nullable: true
        expiresAt:
          type: string
          format: date-time
        viewedAt:
          type: string
          format: date-time
          nullable: true
        startedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    InvitationStatus:
      type: string
      description: >-
        Current status of the partner invitation.


        `failed` means the client started the connection and it did not finish
        (they cancelled Meta's dialog, denied a permission, or abandoned the
        tab). A failed invitation is still usable: the same link can be retried,
        and it moves back to `in_progress` when the client tries again.
      enum:
        - pending
        - in_progress
        - completed
        - expired
        - cancelled
        - failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````