curl --request POST \
--url https://api.example.com/api/v1/invitations/accept \
--header 'Content-Type: application/json' \
--data '
{
"target": {
"type": "email",
"value": "[email protected]"
},
"invitationIds": [
"invitation-12345",
"invitation-67890"
]
}
'{
"id": "invitation-12345",
"accountId": "account-12345",
"attributes": {},
"clickThroughs": 5,
"configurationAttributes": {},
"createdAt": "2023-10-01T12:00:00Z",
"deactivated": false,
"deliveryCount": 3,
"deliveryTypes": [
"email",
"sms"
],
"foreignCreatorId": "creator-12345",
"invitationType": "single_use",
"modifiedAt": "2023-10-01T12:00:00Z",
"status": "queued",
"target": [
{
"type": "email",
"value": "[email protected]"
}
],
"views": 10,
"widgetConfigurationId": "widget-12345",
"projectId": "project-67890",
"groups": [
{
"type": "workspace",
"id": "workspace-12345",
"name": "Development Team"
}
],
"accepts": [
{
"id": "accept-12345",
"status": "accepted"
}
],
"scope": "6b366c56-c0a9-4689-b763-20c890481bc8",
"scopeType": "project",
"expired": false,
"expires": "2023-11-01T12:00:00Z"
}This endpoint is used to accept a pending invitation using the invitation ID. The body must contain the email address with which the user registered. If the invitation is valid and not already accepted or expired, it will be marked as accepted.
curl --request POST \
--url https://api.example.com/api/v1/invitations/accept \
--header 'Content-Type: application/json' \
--data '
{
"target": {
"type": "email",
"value": "[email protected]"
},
"invitationIds": [
"invitation-12345",
"invitation-67890"
]
}
'{
"id": "invitation-12345",
"accountId": "account-12345",
"attributes": {},
"clickThroughs": 5,
"configurationAttributes": {},
"createdAt": "2023-10-01T12:00:00Z",
"deactivated": false,
"deliveryCount": 3,
"deliveryTypes": [
"email",
"sms"
],
"foreignCreatorId": "creator-12345",
"invitationType": "single_use",
"modifiedAt": "2023-10-01T12:00:00Z",
"status": "queued",
"target": [
{
"type": "email",
"value": "[email protected]"
}
],
"views": 10,
"widgetConfigurationId": "widget-12345",
"projectId": "project-67890",
"groups": [
{
"type": "workspace",
"id": "workspace-12345",
"name": "Development Team"
}
],
"accepts": [
{
"id": "accept-12345",
"status": "accepted"
}
],
"scope": "6b366c56-c0a9-4689-b763-20c890481bc8",
"scopeType": "project",
"expired": false,
"expires": "2023-11-01T12:00:00Z"
}Successfully accepted the invitation
The ID of the invitation
"invitation-12345"
The ID of the account associated with the invitation
"account-12345"
Various attributes of the invitation, none exist at the moment, but this acts as a placeholder for future use
The number of times the invitation has been clicked
5
The configuration attributes for the invitation. Includes raw data from widgets.
{}The date and time when the invitation was created
"2023-10-01T12:00:00Z"
Indicates whether the invitation has been deactivated
false
The number of times the invitation has been delivered
3
The types of delivery methods used for the invitation
["email", "sms"]The ID of the creator in your system associated with the invitation
"creator-12345"
The type of the invitation
single_use, multi_use "single_use"
The date and time when the invitation was last modified
"2023-10-01T12:00:00Z"
The current status of the invitation
queued, sending, delivered, accepted, shared, unfurled, accepted_elsewhere "queued"
The target(s) for the invitation, such as email or phone
Show child attributes
[{ "type": "email", "value": "[email protected]" }]The number of times the invitation has been viewed
10
The ID of the widget configuration associated with the invitation
"widget-12345"
The ID of the project associated with the invitation
"project-67890"
DEPRECATED: The groups associated with the invitation, such as workspaces or teams
Show child attributes
[
{
"type": "workspace",
"id": "workspace-12345",
"name": "Development Team"
}
]The acceptance details for the invitation
Show child attributes
[
{
"id": "accept-12345",
"status": "accepted"
}
]The scope of the invitation
"6b366c56-c0a9-4689-b763-20c890481bc8"
The type of scope for the invitation
"project"
Indicates whether the invitation has expired based on the expiry configuration. Always false if the invitation has no expiry configured.
false
The date and time when the invitation will expire or has expired. Only present if the invitation has an expiry configuration (expiryDays > 0).
"2023-11-01T12:00:00Z"