curl --request POST \
--url https://api.example.com/api/v1/invitations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"widgetConfigurationId": "550e8400-e29b-41d4-a716-446655440000",
"target": {
"type": "email",
"value": "[email protected]"
},
"inviter": {
"userId": "user-12345",
"userEmail": "[email protected]",
"userName": "John Doe",
"userAvatarUrl": "https://example.com/avatar.jpg"
},
"groups": [
{
"type": "team",
"groupId": "team-abc123",
"name": "Engineering Team"
}
],
"source": "api",
"templateVariables": {
"companyName": "Acme Inc",
"teamName": "Engineering"
},
"metadata": {
"referralCode": "ABC123",
"campaign": "summer2024"
},
"unfurlConfig": {
"title": "Join our team!",
"description": "You have been invited to collaborate",
"image": "https://example.com/og-image.png",
"type": "website",
"siteName": "Acme App"
}
}
'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"shortLink": "https://vrtx.link/i/abc123",
"status": "queued",
"createdAt": "2024-01-15T12:00:00Z"
}Creates a new invitation from your backend. This endpoint allows you to create invitations programmatically using your API key, without requiring a user JWT.
Target Types:
email: Send an email invitation to the specified email addressphone: Create a phone invitation (the short link is returned for you to send)internal: Create an internal invitation for “People You May Know” flows (no email sent)Inviter Information:
The inviter object contains information about the user creating the invitation. This is equivalent to what would be extracted from a JWT token in the client-side widget.
curl --request POST \
--url https://api.example.com/api/v1/invitations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"widgetConfigurationId": "550e8400-e29b-41d4-a716-446655440000",
"target": {
"type": "email",
"value": "[email protected]"
},
"inviter": {
"userId": "user-12345",
"userEmail": "[email protected]",
"userName": "John Doe",
"userAvatarUrl": "https://example.com/avatar.jpg"
},
"groups": [
{
"type": "team",
"groupId": "team-abc123",
"name": "Engineering Team"
}
],
"source": "api",
"templateVariables": {
"companyName": "Acme Inc",
"teamName": "Engineering"
},
"metadata": {
"referralCode": "ABC123",
"campaign": "summer2024"
},
"unfurlConfig": {
"title": "Join our team!",
"description": "You have been invited to collaborate",
"image": "https://example.com/og-image.png",
"type": "website",
"siteName": "Acme App"
}
}
'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"shortLink": "https://vrtx.link/i/abc123",
"status": "queued",
"createdAt": "2024-01-15T12:00:00Z"
}Invitation details
The ID of the widget configuration to use for this invitation
"550e8400-e29b-41d4-a716-446655440000"
The target of the invitation (who is being invited)
Show child attributes
Information about the user creating the invitation
Show child attributes
Groups/scopes to associate with this invitation
Show child attributes
The source of the invitation for analytics (e.g., "api", "backend", "pymk")
"api"
Template variables for email customization
{
"companyName": "Acme Inc",
"teamName": "Engineering"
}Custom metadata to attach to the invitation (passed through to webhooks)
{
"referralCode": "ABC123",
"campaign": "summer2024"
}Link unfurl (Open Graph) configuration for social/messaging previews
Show child attributes
Successfully created invitation
The ID of the created invitation
"550e8400-e29b-41d4-a716-446655440000"
The short link for the invitation (if applicable)
"https://vrtx.link/i/abc123"
The status of the invitation
"queued"
When the invitation was created
"2024-01-15T12:00:00Z"