---
descriptions:
  send_invitation:
    expires_in_days: |
      How many days the invitations will be valid for.

      Must be between 1 and 30 days. Defaults to 7 days if not specified.
    inviter_user_id: >-
      The ID of the [user](/reference/authkit/user) who invites the recipient.
      The invitation email will mention the name of this user.
    role_slug: >-
      The [role](/authkit/roles) that the recipient will receive when they join
      the organization in the invitation.
    locale: >-
      The locale to use when rendering the invitation email. See [supported
      locales](/authkit/hosted-ui/localization).
reference:
  curl:
    - key: send_invitation
      id: send_invitation
      url: /reference/authkit/invitation/send
      title: /user_management/invitations
      type: POST
      sendsEmail: true
      parameters:
        - key: email
          type: string
          description: (invitation.email)
        - key: organization_id
          optional: true
          type: string
          description: (invitation.organization_id)
        - key: expires_in_days
          optional: true
          type: int
          description: (send_invitation.expires_in_days)
        - key: inviter_user_id
          optional: true
          type: string
          description: (send_invitation.inviter_user_id)
        - key: role_slug
          optional: true
          type: String
          description: (send_invitation.role_slug)
        - key: locale
          optional: true
          type: string
          description: (send_invitation.locale)
      returns:
        - (invitation)
  js:
    - key: sendInvitation
      id: send_invitation
      url: /reference/authkit/invitation/send
      title: userManagement.sendInvitation()
      type: POST
      sendsEmail: true
      parameters:
        - key: email
          type: string
          description: (invitation.email)
        - key: organizationId
          optional: true
          type: string
          description: (invitation.organization_id)
        - key: expiresInDays
          optional: true
          type: int
          description: (send_invitation.expires_in_days)
        - key: inviterUserId
          optional: true
          type: string
          description: (send_invitation.inviter_user_id)
        - key: roleSlug
          optional: true
          type: String
          description: (send_invitation.role_slug)
        - key: locale
          optional: true
          type: string
          description: (send_invitation.locale)
      returns:
        - (Invitation)
  go:
    - key: SendInvitation
      id: send_invitation
      url: /reference/authkit/invitation/send
      title: usermanagement.SendInvitation()
      parameters:
        - (ctx)
        - key: opts
          type: usermanagement.SendInvitationOpts
          unwrap: true
          properties:
            - key: Email
              type: string
              description: (invitation.email)
            - key: OrganizationID
              type: string
              optional: true
              description: (invitation.organization_id)
            - key: ExpiresInDays
              optional: true
              type: int
              description: (send_invitation.expires_in_days)
            - key: InviterUserId
              optional: true
              type: string
              description: (send_invitation.inviter_user_id)
            - key: RoleSlug
              optional: true
              type: String
              description: (send_invitation.role_slug)
      returns:
        - key: invitation
          type: usermanagement.Invitation
          description: (invitation.self)
        - (err)
  php:
    - key: sendInvitation
      id: send_invitation
      url: /reference/authkit/invitation/send
      title: $userManagement->sendInvitation()
      type: POST
      sendsEmail: true
      parameters:
        - key: email
          type: string
          description: (invitation.email)
        - key: organizationId
          optional: true
          type: string
          description: (invitation.organization_id)
        - key: expiresInDays
          optional: true
          type: int
          description: (send_invitation.expires_in_days)
        - key: inviterUserId
          optional: true
          type: string
          description: (send_invitation.inviter_user_id)
      returns:
        - (Invitation)
  python:
    - key: send_invitation
      id: send_invitation
      url: /reference/authkit/invitation/send
      title: user_management.send_invitation()
      sendsEmail: true
      parameters:
        - key: email
          type: str
          description: (invitation.email)
        - key: organization_id
          optional: true
          type: str
          description: (invitation.organization_id)
        - key: expires_in_days
          optional: true
          type: int
          description: (send_invitation.expires_in_days)
        - key: inviter_user_id
          optional: true
          type: str
          description: (send_invitation.inviter_user_id)
        - key: role_slug
          optional: true
          type: str
          description: (send_invitation.role_slug)
      returns:
        - (Invitation)
  ruby:
    - key: send_invitation
      id: send_invitation
      url: /reference/authkit/invitation/send
      title: UserManagement.send_invitation()
      type: POST
      sendsEmail: true
      parameters:
        - key: email
          type: String
          description: (invitation.email)
        - key: organization_id
          optional: true
          type: String
          description: (invitation.organization_id)
        - key: expires_in_days
          optional: true
          type: Integer
          description: (send_invitation.expires_in_days)
        - key: inviter_user_id
          optional: true
          type: String
          description: (send_invitation.inviter_user_id)
      returns:
        - (Invitation)
  java:
    - key: sendInvitation
      id: send_invitation
      url: /reference/authkit/invitation/send
      title: userManagement.sendInvitation()
      type: POST
      sendsEmail: true
      parameters:
        - key: options
          type: SendInvitationOptions
          unwrap: true
          properties:
            - key: email
              type: String
              description: (invitation.email)
            - key: organizationId
              optional: true
              type: String
              description: (invitation.organization_id)
            - key: expiresInDays
              optional: true
              type: Integer
              description: (send_invitation.expires_in_days)
            - key: inviterUserId
              optional: true
              type: String
              description: (send_invitation.inviter_user_id)
            - key: roleSlug
              optional: true
              type: String
              description: (send_invitation.role_slug)
      returns:
        - (Invitation)
originalPath: .tmp-workos-clone/packages/docs/content/reference/authkit/invitation/send.mdx
---

## Send an invitation

Sends an invitation email to the recipient.

<CodeBlock referenceId="send_invitation">
  <CodeBlockTab title="Request" file="send-invitation-request" />
  <CodeBlockTab title="Response" file="send-invitation-response" />
</CodeBlock>
