Entity Invitations
Entity Invitations
Manage entity user invitations - list, accept, cancel, resend.
The Entity Invitation object
Attributes
Invitation ID
Invitee email
User role on the entity
Possible values: "viewer", "editor", "admin"
Current status of the invitation
Possible values: "pending", "accepted", "expired"
When the invitation expires
{
"id": "einv_abc123def456789012345678",
"entity_id": "ent_abc123def456",
"email": "newuser@example.com",
"name": "John Doe",
"role": "editor",
"status": "pending",
"invited_by": "user_xyz789",
"expires_at": "2024-01-08T00:00:00.000Z",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}Accept invitation
/invitations/acceptAccept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. Returns an access token for immediate use.
Query parameters
Invitation token from the invitation email
Body parameters
Password for the new user account, or current password for an existing invited user
curl -X POST "https://eu.spaceinvoices.com/invitations/accept?token=2026-12-31" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"password": "string"
}'Returns
{
"user_id": "user_abc123",
"entity_id": "ent_xyz789",
"access_token": "token_live_abc123"
}List entity invitations
/entities/invitationsRetrieve all invitations for the current entity, including pending, accepted, and expired.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
curl "https://eu.spaceinvoices.com/entities/invitations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"data": [
{
"id": "einv_abc123def456789012345678",
"entity_id": "ent_abc123def456",
"email": "newuser@example.com",
"name": "John Doe",
"role": "editor",
"status": "pending",
"invited_by": "user_xyz789",
"expires_at": "2024-01-08T00:00:00.000Z",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
]
}Get entity invitation
/entities/invitations/{id}Retrieve details of a specific invitation.
Header parameters
Optional entity ID specifying which entity context to use for this operation.
Path parameters
Space Invoices resource identifier (format: {prefix}_{hex24})
curl "https://eu.spaceinvoices.com/entities/invitations/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
Invitation ID
Invitee email
{
"id": "einv_abc123def456789012345678",
"entity_id": "ent_abc123def456",
"email": "newuser@example.com",
"name": "John Doe",
"role": "editor",
"status": "pending",
"invited_by": "user_xyz789",
"expires_at": "2024-01-08T00:00:00.000Z",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}Cancel invitation
/entities/invitations/{id}Cancel a pending invitation. Cannot cancel already accepted invitations.
Header parameters
Optional entity ID specifying which entity context to use for this operation.
Path parameters
Space Invoices resource identifier (format: {prefix}_{hex24})
curl -X DELETE "https://eu.spaceinvoices.com/entities/invitations/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"message": "Invitation cancelled"
}Preview invitation
/invitations/previewPreview an entity invitation by token before accepting it.
Query parameters
Invitation token from the invitation email
curl "https://eu.spaceinvoices.com/invitations/preview?token=2026-12-31" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"email": "string",
"entity_name": "string",
"existing_user": true,
"role": "viewer",
"status": "pending",
"expires_at": "2025-01-15T10:30:00.000Z"
}Resend invitation
/entities/invitations/{id}/resendResend an invitation email with a new token and extended expiry.
Header parameters
Optional entity ID specifying which entity context to use for this operation.
Path parameters
Space Invoices resource identifier (format: {prefix}_{hex24})
curl -X POST "https://eu.spaceinvoices.com/entities/invitations/{id}/resend" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"message": "Invitation resent"
}