---
descriptions:
  invitation:
    self: 'The corresponding [invitation](/reference/authkit/invitation) object.'
    object: Distinguishes the invitation object.
    id: The unique ID of the invitation.
    email: The email address of the recipient.
    state: >-
      The state of the invitation. Its values can be "accepted", "pending",
      "expired" and "revoked".
    accepted_at: The timestamp when the invitation was accepted.
    revoked_at: The timestamp when the invitation was revoked.
    expires_at: The timestamp when the invitation expires.
    token: The token used to accept the invitation.
    accept_invitation_url: The URL where the recipient can accept the invitation.
    organization_id: >-
      The ID of the [organization](/reference/organization) that the recipient
      will join.
    inviter_user_id: 'The ID of the user who invited the recipient, if provided.'
    accepted_user_id: 'The ID of the user who accepted the invitation, once accepted.'
    created_at: The timestamp when the invitation was created.
    updated_at: The timestamp when the invitation was last updated.
reference:
  curl:
    - url: /reference/authkit/invitation
      key: invitation
      id: invitation
      title: invitation
      properties:
        - key: id
          type: string
          description: (invitation.id)
        - key: email
          type: string
          description: (invitation.email)
        - key: state
          type: '"pending" | "accepted" | "revoked" | "expired"'
          description: (invitation.state)
        - key: accepted_at
          optional: true
          type: string
          description: (invitation.accepted_at)
        - key: revoked_at
          optional: true
          type: string
          description: (invitation.revoked_at)
        - key: expires_at
          type: string
          description: (invitation.expires_at)
        - key: token
          type: string
          description: (invitation.token)
        - key: accept_invitation_url
          type: string
          description: (invitation.accept_invitation_url)
        - key: organization_id
          optional: true
          type: string
          description: (invitation.organization_id)
        - key: inviter_user_id
          optional: true
          type: string
          description: (invitation.inviter_user_id)
        - key: accepted_user_id
          optional: true
          type: string
          description: (invitation.accepted_user_id)
        - key: created_at
          type: string
          description: (invitation.created_at)
        - key: updated_at
          type: string
          description: (invitation.updated_at)
  js:
    - url: /reference/authkit/invitation
      key: Invitation
      id: invitation
      title: interface Invitation
      properties:
        - key: object
          type: '"invitation"'
          description: (invitation.object)
        - key: id
          type: string
          description: (invitation.id)
        - key: email
          type: string
          description: (invitation.email)
        - key: state
          type: '"pending" | "accepted" | "revoked" | "expired"'
          description: (invitation.state)
        - key: acceptedAt
          optional: true
          type: string
          description: (invitation.accepted_at)
        - key: revokedAt
          optional: true
          type: string
          description: (invitation.revoked_at)
        - key: expiresAt
          type: string
          description: (invitation.expires_at)
        - key: token
          type: string
          description: (invitation.token)
        - key: acceptInvitationUrl
          type: string
          description: (invitation.accept_invitation_url)
        - key: organizationId
          optional: true
          type: string
          description: (invitation.organization_id)
        - key: inviterUserId
          optional: true
          type: string
          description: (invitation.inviter_user_id)
        - key: createdAt
          type: string
          description: (invitation.created_at)
        - key: updatedAt
          type: string
          description: (invitation.updated_at)
  go:
    - url: /reference/authkit/invitation
      key: Invitation
      id: invitation
      title: usermanagement.Invitation
      properties:
        - key: ID
          type: string
          description: (invitation.id)
        - key: Email
          type: string
          description: (invitation.email)
        - key: State
          type: '"pending" | "accepted" | "revoked" | "expired"'
          description: (invitation.state)
        - key: AcceptedAt
          type: string
          optional: true
          description: (invitation.accepted_at)
        - key: RevokedAt
          type: string
          optional: true
          description: (invitation.revoked_at)
        - key: ExpiresAt
          type: string
          description: (invitation.expires_at)
        - key: Token
          type: string
          description: (invitation.token)
        - key: AcceptInvitationUrl
          type: string
          description: (invitation.accept_invitation_url)
        - key: OrganizationId
          type: string
          optional: true
          description: (invitation.organization_id)
        - key: InviterUserId
          optional: true
          type: string
          description: (invitation.inviter_user_id)
        - key: CreatedAt
          type: string
          description: (invitation.created_at)
        - key: UpdatedAt
          type: string
          description: (invitation.updated_at)
  php:
    - url: /reference/authkit/invitation
      key: Invitation
      id: invitation
      title: WorkOS\Resource\Invitation
      properties:
        - key: object
          type: '"invitation"'
          description: (invitation.object)
        - key: id
          type: string
          description: (invitation.id)
        - key: email
          type: string
          description: (invitation.email)
        - key: state
          type: '"pending" | "accepted" | "revoked" | "expired"'
          description: (invitation.state)
        - key: acceptedAt
          optional: true
          type: string
          description: (invitation.accepted_at)
        - key: revokedAt
          optional: true
          type: string
          description: (invitation.revoked_at)
        - key: expiresAt
          type: string
          description: (invitation.expires_at)
        - key: token
          type: string
          description: (invitation.token)
        - key: acceptInvitationUrl
          type: string
          description: (invitation.accept_invitation_url)
        - key: organizationId
          optional: true
          type: string
          description: (invitation.organization_id)
        - key: inviterUserId
          optional: true
          type: string
          description: (invitation.inviter_user_id)
        - key: createdAt
          type: string
          description: (invitation.created_at)
        - key: updatedAt
          type: string
          description: (invitation.updated_at)
  python:
    - url: /reference/authkit/invitation
      key: Invitation
      id: invitation
      title: Invitation
      properties:
        - key: id
          type: str
          description: (invitation.id)
        - key: email
          type: str
          description: (invitation.email)
        - key: state
          type: str
          description: (invitation.state)
        - key: accepted_at
          optional: true
          type: str
          description: (invitation.accepted_at)
        - key: revoked_at
          optional: true
          type: str
          description: (invitation.revoked_at)
        - key: expires_at
          type: str
          description: (invitation.expires_at)
        - key: token
          type: str
          description: (invitation.token)
        - key: accept_invitation_url
          type: str
          description: (invitation.accept_invitation_url)
        - key: organization_id
          optional: true
          type: str
          description: (invitation.organization_id)
        - key: inviter_user_id
          optional: true
          type: str
          description: (invitation.inviter_user_id)
        - key: created_at
          type: str
          description: (invitation.created_at)
        - key: updated_at
          type: str
          description: (invitation.updated_at)
  ruby:
    - url: /reference/authkit/invitation
      key: Invitation
      id: invitation
      title: class Invitation
      properties:
        - key: id
          type: String
          description: (invitation.id)
        - key: email
          type: String
          description: (invitation.email)
        - key: state
          type: '"pending" | "accepted" | "revoked" | "expired"'
          description: (invitation.state)
        - key: accepted_at
          optional: true
          type: String
          description: (invitation.accepted_at)
        - key: revoked_at
          optional: true
          type: String
          description: (invitation.revoked_at)
        - key: expires_at
          type: String
          description: (invitation.expires_at)
        - key: token
          type: String
          description: (invitation.token)
        - key: accept_invitation_url
          type: String
          description: (invitation.accept_invitation_url)
        - key: organization_id
          optional: true
          type: String
          description: (invitation.organization_id)
        - key: inviter_user_id
          optional: true
          type: String
          description: (invitation.inviter_user_id)
        - key: created_at
          type: String
          description: (invitation.created_at)
        - key: updated_at
          type: String
          description: (invitation.updated_at)
  java:
    - url: /reference/authkit/invitation
      key: Invitation
      id: invitation
      title: class Invitation
      properties:
        - key: id
          type: String
          description: (invitation.id)
        - key: email
          type: String
          description: (invitation.email)
        - key: state
          type: InvitationStateEnumType
          description: (invitation.state)
        - key: acceptedAt
          optional: true
          type: String
          description: (invitation.accepted_at)
        - key: revokedAt
          optional: true
          type: String
          description: (invitation.revoked_at)
        - key: expiresAt
          type: String
          description: (invitation.expires_at)
        - key: token
          type: String
          description: (invitation.token)
        - key: acceptInvitationUrl
          type: String
          description: (invitation.accept_invitation_url)
        - key: organizationId
          optional: true
          type: String
          description: (invitation.organization_id)
        - key: inviterUserId
          optional: true
          type: String
          description: (invitation.inviter_user_id)
        - key: createdAt
          type: String
          description: (invitation.created_at)
        - key: updatedAt
          type: String
          description: (invitation.updated_at)
originalPath: .tmp-workos-clone/packages/docs/content/reference/authkit/invitation/index.mdx
---

# Invitation

An email invitation allows the recipient to sign up for your app and join a specific [organization](/reference/organization). When an invitation is accepted, a [user](/reference/authkit/user) and a corresponding [organization membership](/reference/authkit/organization-membership) are created.

Users may be invited to your app without joining an organization, or they may be invited to join an organization if they already have an account. Invitations may be also issued on behalf of another user. In this case, the invitation email will mention the name of the user who invited the recipient.

<CodeBlock
  title="Example invitation"
  referenceId="invitation"
  file="invitation"
/>
