Invitations
Base URL: https://app.neuroflash.com/api/workspace-service
Invite users to join a workspace via email.
Create a workspace invite
/v1/workspaces/{workspaceId}/invitesCreates a new workspace invite for the specified email address. Only workspace admins and owners can create invites.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
Request Body
emailstringYesEmail address of the person being invited to the workspacerolestringYesrole which the new member should be assignedResponse
_embeddedobject
acceptingCustomerobject
emailstringEmail of the customerhadTrialbooleanTrue if the customer has ever started a trial in any workspacelegacyIdintegerID of the customer in the legacy systemnamestringName of the customerinviterobject
emailstringEmail of the customerhadTrialbooleanTrue if the customer has ever started a trial in any workspacelegacyIdintegerID of the customer in the legacy systemnamestringName of the customerstatusstringStripeStatus of the invitationacceptedAtstringTimestamp when the invitation was acceptedacceptedByLegacyCustomerIdintegerID of the legacy customer who accepted the invitationacceptedByWorkspaceMemberIdstringID of the workspace member who accepted the invitationcreatedAtstringcreatedByLegacyCustomerIdintegerID of the legacy customer who created the invitationcreatedByUserIdstringdeniedAtstringTimestamp when the invitation was denied by the inviteeemailstringEmail address of the person being invited to the workspaceexpiresAtstringTimestamp when the invitation expiresidstringimportedFromLegacyTeamCustomerIdintegerID of the legacy team customer this was imported fromimportedFromLegacyTeamInviteIdintegerID of the legacy team invite this was imported fromresentAtarray<string>Timestamps when the invitation was resentrolestringrole which the new member should be assignedupdatedAtstringworkspaceIdstringID of the workspace the invitation is forExample
- cURL
- Python
- Node.js
- Go
curl -X POST "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "string",
"role": "string"
}'
import requests
response = requests.post(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"email": "string",
"role": "string"
},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/invites`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"email": "string",
"role": "string"
}),
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{
"email": "string",
"role": "string",
})
req, _ := http.NewRequest("POST", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/invites", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{
"_embedded": {
"acceptingCustomer": {
"email": "eren.jaeger@neuroflash.com",
"hadTrial": false,
"legacyId": 5,
"name": "Eren Jaeger"
},
"inviter": {
"email": "eren.jaeger@neuroflash.com",
"hadTrial": false,
"legacyId": 5,
"name": "Eren Jaeger"
},
"status": "PENDING"
},
"acceptedAt": "2023-06-15T10:30:00Z",
"acceptedByLegacyCustomerId": 54321,
"acceptedByWorkspaceMemberId": "550e8400-e29b-41d4-a716-446655440001",
"createdAt": "2025-01-14T16:20:59Z",
"createdByLegacyCustomerId": 12345,
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"deniedAt": "2023-05-20T15:45:00Z",
"email": "max.mustermann@neuroflash.com",
"expiresAt": "2023-12-31T23:59:59Z",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"importedFromLegacyTeamCustomerId": 9876,
"importedFromLegacyTeamInviteId": 7890,
"resentAt": [
"[\"2023-01-01T12:00:00Z\"",
"\"2023-01-02T14:30:00Z\"]"
],
"role": "MEMBER",
"updatedAt": "2025-01-14T16:20:59Z",
"workspaceId": "550e8400-e29b-41d4-a716-446655440000"
}
Deny a workspace invite
/v1/workspaces/{workspaceId}/invites/{inviteId}/denialDenies a workspace invite using the confirmation code. Authentication is required.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
Request Body
confirmationCodestringYesThe confirmation code from the invite emailExample
- cURL
- Python
- Node.js
- Go
curl -X POST "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}/denial" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"confirmationCode": "string"
}'
import requests
response = requests.post(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}/denial",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"confirmationCode": "string"
},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/invites/${inviteId}/denial`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"confirmationCode": "string"
}),
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{
"confirmationCode": "string",
})
req, _ := http.NewRequest("POST", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/invites/"+inviteID+"/denial", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{}
Resend invitation email
/v1/workspaces/{workspaceId}/invites/{inviteId}/emailsResends the invitation email for a specific invite. Only authenticated users can resend emails.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
inviteId | string | Yes | Invite ID |
Response
_embeddedobject
acceptingCustomerobject
emailstringEmail of the customerhadTrialbooleanTrue if the customer has ever started a trial in any workspacelegacyIdintegerID of the customer in the legacy systemnamestringName of the customerinviterobject
emailstringEmail of the customerhadTrialbooleanTrue if the customer has ever started a trial in any workspacelegacyIdintegerID of the customer in the legacy systemnamestringName of the customerstatusstringStripeStatus of the invitationacceptedAtstringTimestamp when the invitation was acceptedacceptedByLegacyCustomerIdintegerID of the legacy customer who accepted the invitationacceptedByWorkspaceMemberIdstringID of the workspace member who accepted the invitationcreatedAtstringcreatedByLegacyCustomerIdintegerID of the legacy customer who created the invitationcreatedByUserIdstringdeniedAtstringTimestamp when the invitation was denied by the inviteeemailstringEmail address of the person being invited to the workspaceexpiresAtstringTimestamp when the invitation expiresidstringimportedFromLegacyTeamCustomerIdintegerID of the legacy team customer this was imported fromimportedFromLegacyTeamInviteIdintegerID of the legacy team invite this was imported fromresentAtarray<string>Timestamps when the invitation was resentrolestringrole which the new member should be assignedupdatedAtstringworkspaceIdstringID of the workspace the invitation is forExample
- cURL
- Python
- Node.js
- Go
curl -X POST "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}/emails" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
import requests
response = requests.post(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}/emails",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/invites/${inviteId}/emails`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{})
req, _ := http.NewRequest("POST", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/invites/"+inviteID+"/emails", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{
"_embedded": {
"acceptingCustomer": {
"email": "eren.jaeger@neuroflash.com",
"hadTrial": false,
"legacyId": 5,
"name": "Eren Jaeger"
},
"inviter": {
"email": "eren.jaeger@neuroflash.com",
"hadTrial": false,
"legacyId": 5,
"name": "Eren Jaeger"
},
"status": "PENDING"
},
"acceptedAt": "2023-06-15T10:30:00Z",
"acceptedByLegacyCustomerId": 54321,
"acceptedByWorkspaceMemberId": "550e8400-e29b-41d4-a716-446655440001",
"createdAt": "2025-01-14T16:20:59Z",
"createdByLegacyCustomerId": 12345,
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"deniedAt": "2023-05-20T15:45:00Z",
"email": "max.mustermann@neuroflash.com",
"expiresAt": "2023-12-31T23:59:59Z",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"importedFromLegacyTeamCustomerId": 9876,
"importedFromLegacyTeamInviteId": 7890,
"resentAt": [
"[\"2023-01-01T12:00:00Z\"",
"\"2023-01-02T14:30:00Z\"]"
],
"role": "MEMBER",
"updatedAt": "2025-01-14T16:20:59Z",
"workspaceId": "550e8400-e29b-41d4-a716-446655440000"
}
Accept a workspace invite
/v1/workspaces/{workspaceId}/invites/{inviteId}/confirmationAccepts a workspace invite using the confirmation code. Authentication is required.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
Request Body
confirmationCodestringYesThe confirmation code from the invite emailExample
- cURL
- Python
- Node.js
- Go
curl -X POST "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}/confirmation" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"confirmationCode": "string"
}'
import requests
response = requests.post(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}/confirmation",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"confirmationCode": "string"
},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/invites/${inviteId}/confirmation`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"confirmationCode": "string"
}),
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{
"confirmationCode": "string",
})
req, _ := http.NewRequest("POST", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/invites/"+inviteID+"/confirmation", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{}
List workspace invites
/v1/workspaces/{workspaceId}/invitesRetrieves all workspace invites for a workspace. Only workspace admins and owners can list invites.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
pending | boolean | — | Filter for pending invitations (not cancelled, not accepted, and not expired) |
Response
dataarray<object>
_embeddedobject
acceptingCustomerobject
emailstringEmail of the customerhadTrialbooleanTrue if the customer has ever started a trial in any workspacelegacyIdintegerID of the customer in the legacy systemnamestringName of the customerinviterobject
emailstringEmail of the customerhadTrialbooleanTrue if the customer has ever started a trial in any workspacelegacyIdintegerID of the customer in the legacy systemnamestringName of the customerstatusstringStripeStatus of the invitationacceptedAtstringTimestamp when the invitation was acceptedacceptedByLegacyCustomerIdintegerID of the legacy customer who accepted the invitationacceptedByWorkspaceMemberIdstringID of the workspace member who accepted the invitationcreatedAtstringcreatedByLegacyCustomerIdintegerID of the legacy customer who created the invitationcreatedByUserIdstringdeniedAtstringTimestamp when the invitation was denied by the inviteeemailstringEmail address of the person being invited to the workspaceexpiresAtstringTimestamp when the invitation expiresidstringimportedFromLegacyTeamCustomerIdintegerID of the legacy team customer this was imported fromimportedFromLegacyTeamInviteIdintegerID of the legacy team invite this was imported fromresentAtarray<string>Timestamps when the invitation was resentrolestringrole which the new member should be assignedupdatedAtstringworkspaceIdstringID of the workspace the invitation is forpageobject
currentPageintegersizeintegertotalElementsintegertotalPagesintegerExample
- cURL
- Python
- Node.js
- Go
curl "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
response = requests.get(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/invites`,
{ headers: { Authorization: `Bearer ${token}` } }
).then((r) => r.json());
req, _ := http.NewRequest("GET", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/invites", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{
"data": [
{
"_embedded": {
"acceptingCustomer": {
"email": "...",
"hadTrial": "...",
"legacyId": "...",
"name": "..."
},
"inviter": {
"email": "...",
"hadTrial": "...",
"legacyId": "...",
"name": "..."
},
"status": "PENDING"
},
"acceptedAt": "2023-06-15T10:30:00Z",
"acceptedByLegacyCustomerId": 54321,
"acceptedByWorkspaceMemberId": "550e8400-e29b-41d4-a716-446655440001",
"createdAt": "2025-01-14T16:20:59Z",
"createdByLegacyCustomerId": 12345,
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"deniedAt": "2023-05-20T15:45:00Z",
"email": "max.mustermann@neuroflash.com",
"expiresAt": "2023-12-31T23:59:59Z",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"importedFromLegacyTeamCustomerId": 9876,
"importedFromLegacyTeamInviteId": 7890,
"resentAt": [
"[\"2023-01-01T12:00:00Z\"",
"\"2023-01-02T14:30:00Z\"]"
],
"role": "MEMBER",
"updatedAt": "2025-01-14T16:20:59Z",
"workspaceId": "550e8400-e29b-41d4-a716-446655440000"
}
],
"page": {
"currentPage": 2,
"size": 10,
"totalElements": 35,
"totalPages": 4
}
}
Get a workspace invite
/v1/workspaces/{workspaceId}/invites/{inviteId}Retrieves a workspace invite by its ID. Only workspace admins and owners can view invites.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
inviteId | string | Yes | Invite ID |
Response
_embeddedobject
acceptingCustomerobject
emailstringEmail of the customerhadTrialbooleanTrue if the customer has ever started a trial in any workspacelegacyIdintegerID of the customer in the legacy systemnamestringName of the customerinviterobject
emailstringEmail of the customerhadTrialbooleanTrue if the customer has ever started a trial in any workspacelegacyIdintegerID of the customer in the legacy systemnamestringName of the customerstatusstringStripeStatus of the invitationacceptedAtstringTimestamp when the invitation was acceptedacceptedByLegacyCustomerIdintegerID of the legacy customer who accepted the invitationacceptedByWorkspaceMemberIdstringID of the workspace member who accepted the invitationcreatedAtstringcreatedByLegacyCustomerIdintegerID of the legacy customer who created the invitationcreatedByUserIdstringdeniedAtstringTimestamp when the invitation was denied by the inviteeemailstringEmail address of the person being invited to the workspaceexpiresAtstringTimestamp when the invitation expiresidstringimportedFromLegacyTeamCustomerIdintegerID of the legacy team customer this was imported fromimportedFromLegacyTeamInviteIdintegerID of the legacy team invite this was imported fromresentAtarray<string>Timestamps when the invitation was resentrolestringrole which the new member should be assignedupdatedAtstringworkspaceIdstringID of the workspace the invitation is forExample
- cURL
- Python
- Node.js
- Go
curl "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
response = requests.get(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/invites/${inviteId}`,
{ headers: { Authorization: `Bearer ${token}` } }
).then((r) => r.json());
req, _ := http.NewRequest("GET", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/invites/"+inviteID+"", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{
"_embedded": {
"acceptingCustomer": {
"email": "eren.jaeger@neuroflash.com",
"hadTrial": false,
"legacyId": 5,
"name": "Eren Jaeger"
},
"inviter": {
"email": "eren.jaeger@neuroflash.com",
"hadTrial": false,
"legacyId": 5,
"name": "Eren Jaeger"
},
"status": "PENDING"
},
"acceptedAt": "2023-06-15T10:30:00Z",
"acceptedByLegacyCustomerId": 54321,
"acceptedByWorkspaceMemberId": "550e8400-e29b-41d4-a716-446655440001",
"createdAt": "2025-01-14T16:20:59Z",
"createdByLegacyCustomerId": 12345,
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"deniedAt": "2023-05-20T15:45:00Z",
"email": "max.mustermann@neuroflash.com",
"expiresAt": "2023-12-31T23:59:59Z",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"importedFromLegacyTeamCustomerId": 9876,
"importedFromLegacyTeamInviteId": 7890,
"resentAt": [
"[\"2023-01-01T12:00:00Z\"",
"\"2023-01-02T14:30:00Z\"]"
],
"role": "MEMBER",
"updatedAt": "2025-01-14T16:20:59Z",
"workspaceId": "550e8400-e29b-41d4-a716-446655440000"
}
Delete a workspace invite
/v1/workspaces/{workspaceId}/invites/{inviteId}Deletes a workspace invite by its ID. Only workspace admins and owners can delete invites. Accepted invites cannot be deleted.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
inviteId | string | Yes | Invite ID |
Example
- cURL
- Python
- Node.js
- Go
curl -X DELETE "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
requests.delete(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/invites/{invite_id}",
headers={"Authorization": f"Bearer {token}"},
)
await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/invites/${inviteId}`,
{
method: "DELETE",
headers: { Authorization: `Bearer ${token}` },
}
);
req, _ := http.NewRequest("DELETE", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/invites/"+inviteID+"", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{}