API Reference - User Invite Logs
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108072
← Back to API Reference | Getting Started
User Invite Logs
User Invite Logs tracks outbound email invitations sent to prospective members. Each record captures the invitation email address, template used, send status, and a token for tracking when the recipient accepts the invite.
Model name in URL:
user_invite_log — DB table: user_invite_logThe User Invite Logs Object
| Field | Type | Description |
|---|---|---|
invite_id | integer | Unique invite log record ID (primary key, read-only) |
sent | integer | Whether the invitation email was sent (0 = not sent, 1 = sent) |
user_id | integer | ID of the member who sent this invitation |
template | string | Email template identifier used for this invitation |
subject | string | Subject line of the invitation email |
message | text | Full body content of the invitation email |
date_sent | string | Date the invitation was sent, formatted as YYYYMMDDHHmmss |
email | string | Email address the invitation was sent to |
affiliation_id | integer | ID of the affiliation or group context for this invitation |
status | string | Current status of the invitation (EG Pending, Accepted; default Pending) |
invite_token | string | Unique token embedded in the invitation link to identify the recipient when they sign up |
List User Invite Log Records
GET /api/v2/user_invite_log/get
Returns a paginated list of user invite log records.
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/user_invite_log/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"invite_id": "1",
"sent": "1",
"user_id": "42",
"template": "invite_default",
"subject": "You are invited to join our directory",
"message": "",
"date_sent": "20240315140000",
"email": "sarah@example.com",
"affiliation_id": "0",
"status": "Pending",
"invite_token": "a1b2c3d4e5f6"
},
{
"invite_id": "2",
"sent": "1",
"user_id": "42",
"template": "invite_default",
"subject": "Join our professional network",
"message": "",
"date_sent": "20240316090000",
"email": "mike@example.com",
"affiliation_id": "0",
"status": "Accepted",
"invite_token": "x9y8z7w6v5u4"
}
],
"total": "87",
"current_page": 1,
"total_pages": 4,
"next_page": "MipfKjI1"
}Retrieve a User Invite Log Record
GET /api/v2/user_invite_log/get/{invite_id}
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/user_invite_log/get/1" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"invite_id": "1",
"sent": "1",
"user_id": "42",
"template": "invite_default",
"subject": "You are invited to join our directory",
"message": "",
"date_sent": "20240315140000",
"email": "sarah@example.com",
"affiliation_id": "0",
"status": "Pending",
"invite_token": "a1b2c3d4e5f6"
}
],
"total": "87",
"current_page": 1,
"total_pages": 87
}Create a User Invite Log Record
POST /api/v2/user_invite_log/create
Example Request
Copy
curl -X POST "https://www.yourdomain.com/api/v2/user_invite_log/create" \ -H "X-Api-Key: your-api-key-here" \ -d "user_id=1" \ -d "email=newmember@example.com" \ -d "subject=You are invited to join our directory" \ -d "template=invite_default" \ -d "status=Pending" \ -d "invite_token=abc123xyz"
Example Response
Copy
{
"status": "success",
"message": {
"invite_id": "88",
"sent": null,
"user_id": "1",
"template": "invite_default",
"subject": "You are invited to join our directory",
"message": null,
"date_sent": null,
"email": "newmember@example.com",
"affiliation_id": null,
"status": "Pending",
"invite_token": "abc123xyz"
}
}Update a User Invite Log Record
PUT /api/v2/user_invite_log/update
Example Request
Copy
curl -X PUT "https://www.yourdomain.com/api/v2/user_invite_log/update" \ -H "X-Api-Key: your-api-key-here" \ -d "invite_id=1" \ -d "status=Accepted"
Example Response
Copy
{
"status": "success",
"message": {
"invite_id": "1",
"sent": "1",
"user_id": "42",
"template": "invite_default",
"subject": "You are invited to join our directory",
"message": "",
"date_sent": "20240315140000",
"email": "sarah@example.com",
"affiliation_id": "0",
"status": "Accepted",
"invite_token": "a1b2c3d4e5f6"
}
}Delete a User Invite Log Record
DELETE /api/v2/user_invite_log/delete
Example Request
Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/user_invite_log/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "invite_id=1"
Example Response
Copy
{
"status": "success",
"message": "user_invite_log record was deleted"
}