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

# Inviting Parties

> Invite external parties to collaborate on threads

### Creating Invitations

<CodeGroup>
  ```javascript JavaScript theme={null}
  const invitation = await thread.inviteParty({
    role: 'logistics',
    accessLevel: Threadify.FOR_EXTERNAL,
    expiresIn: '48h'
  });

  // Share invitation.token with the other party
  ```

  ```go Go theme={null}
  invitation, err := thread.InviteParty(ctx, threadify.InviteOptions{
      Role:        "logistics",
      AccessLevel: threadify.ForExternal,
      ExpiresIn:   "48h",
  })
  if err != nil {
      log.Fatal(err)
  }

  // Share invitation.Token with the other party
  fmt.Println("Token:", invitation.Token)
  ```

  ```python Python theme={null}
  from threadify import Threadify
  from threadify.models import InviteOptions

  invitation = await thread.invite_party(
      InviteOptions(role="logistics", access_level=Threadify.FOR_EXTERNAL, expires_in="48h")
  )

  # Share invitation.token with the other party
  print("Token:", invitation.token)
  ```
</CodeGroup>

### Parameters

| Parameter     | Type   | Default      | Description                                                                                                                |
| ------------- | ------ | ------------ | -------------------------------------------------------------------------------------------------------------------------- |
| `role`        | string | required     | Business/contract role (e.g., `"logistics"`, `"supplier"`, `"merchant"`)                                                   |
| `accessLevel` | string | `'external'` | Permission level. Use SDK enums: `Threadify.FOR_EXTERNAL` (default), `Threadify.FOR_OBSERVER`, `Threadify.FOR_PARTICIPANT` |
| `expiresIn`   | string | `'24h'`      | Token expiration (e.g., `'24h'`, `'7d'`)                                                                                   |

### Invitation Properties

| Property      | Type   | Description               |
| ------------- | ------ | ------------------------- |
| `token`       | string | Invitation token to share |
| `threadId`    | string | Thread ID                 |
| `role`        | string | Assigned role             |
| `accessLevel` | string | Access level              |
| `expiresAt`   | string | ISO timestamp             |

### Next Steps

<CardGroup cols={2}>
  <Card title="Joining Threads" icon="arrow-right-to-bracket" href="/core-concepts/thread-collaboration/joining-threads">
    Learn how to join threads with invitations
  </Card>

  <Card title="Managing Access" icon="users-gear" href="/core-concepts/thread-collaboration/managing-access">
    Manage thread participants and permissions
  </Card>
</CardGroup>
