User Creation & Invitation
Invite a new or existing user to join your organization on HeyPeers. If a pending invitation already exists, the API returns the existing invitation URL so you can resend it.
Endpoint
- POST:
/organizations/:id/invite_user
Request
| Field | Location | Required | Description |
|---|---|---|---|
Authorization | Header | ✅ | Bearer <token> from the Authentication endpoint. |
email | Body | ✅ | Email address of the invitee. |
first_name | Body | ✅ | First name of the invitee. |
last_name | Body | ✅ | Last name of the invitee. |
curl -X POST "https://heypeers.com/api/v2/organizations/{ORG_ID}/invite_user" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"first_name": "John",
"last_name": "Doe"
}'Responses
| Status | Body |
|---|---|
200 OK | json\n{\n "success": "User invited successfully.",\n "user": {\n "id": "[UUID]",\n "email": "[email]",\n "first_name": "[first_name]",\n "last_name": "[last_name]",\n "invitation_url": "[invitation_url]"\n }\n}\n |
400 Bad Request | { "error": "[Error Message]" } |
Common validation errors: duplicate email for another organization, malformed email, or missing required fields. Use the returned invitation_url to deep-link the user to their onboarding experience.***
Last updated on