Create an invite link
const url = 'https://api.vexarn.dev/api/invite-links';const options = { method: 'POST', headers: { cookie: '__Host-vexarn.session_token=<__Host-vexarn.session_token>', 'Content-Type': 'application/json' }, body: '{"label":"Conference","expiresIn":"7d","maxUses":25}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vexarn.dev/api/invite-links \ --header 'Content-Type: application/json' \ --cookie __Host-vexarn.session_token=<__Host-vexarn.session_token> \ --data '{ "label": "Conference", "expiresIn": "7d", "maxUses": 25 }'At most 20 active links at once.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Lifetime (default 7d) and use limit (default null, none) from the Discord set.
object
Trimmed; empty or null means none; at most 64 characters.
Example
{ "label": "Conference", "expiresIn": "7d", "maxUses": 25}Responses
Section titled “Responses”The created link
object
The link is <web app>/i/<code>.
Your note on the link, seen only by you.
null: never expires.
null: no use limit.
Example
{ "code": "k3v9x2m7q1ab", "expiresAt": "2026-11-06T12:00:00.000Z", "createdAt": "2026-11-06T12:00:00.000Z", "status": "active"}An unsupported lifetime or use limit, or a label too long (validation_error)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}No session
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Choose a username first (username_required), or you have the most active links allowed (invite_link_limit_reached)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}The body is larger than the API accepts
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}The body is not application/json
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Too many requests from this user or client address
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Headers
Section titled “Headers”Seconds until the rate limit window resets