Create a magic link
Generate a new magic link for a contact. The link will be valid for 7 days and can be used to authenticate the contact to access Trust Center resources. This endpoint is typically used when approving access requests or when inviting new contacts to the Trust Center.
AuthorizationBearer <token>
In: header
contact_idstring
The UUID of the contact to create a magic link for
Format
uuid
redirect_url?string
Optional URL to redirect to after successful authentication. Defaults to "/" if not provided.
Default
"/"
Format
uri
Response Body
const body = JSON.stringify({
"contact_id": "550e8400-e29b-41d4-a716-446655440001"
})
fetch("https://app.orbiqhq.com/api/v1/magic-links", {
body
})
{
"success": true,
"status": 201,
"data": {
"magic_link": {
"id": "ml-550e8400-e29b-41d4-a716-446655440000",
"token": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
"contact": "550e8400-e29b-41d4-a716-446655440001",
"redirect_url": "/",
"expires_at": "2025-01-22T10:00:00Z",
"tenant": "tenant-123"
}
}
}
{
"success": false,
"error": "Invalid input: contact_id: Invalid uuid"
}
Empty
{
"success": false,
"error": "Failed to create magic link"
}
How is this guide?