Vekta API
Workspaces

Invite someone to a workspace

Invites someone by email to join the workspace as an athlete or coach.

If this email already has a pending invitation to the workspace, you get the same code back and it's valid for two more days. Set sendInvitationEmail to true to have Vekta email the code. This endpoint only counts toward the per API key rate limit.

Responds with:

  • 404 not_found: the workspace doesn't exist, or you aren't one of its admins or coaches.
  • 400 bad_request: invalid parameters or payload.
POST
/workspaces/{workspaceId}/invitations

Authorization

bearer
AuthorizationBearer <token>

Your Vekta API key, sent as Authorization: Bearer vk_..., or an OAuth access token of an app you connected, sent as Authorization: Bearer <access token>.

In: header

Path Parameters

workspaceId*string

Id of a workspace where you're an admin or coach (see workspaces in GET /users/me)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

email*string
Formatemail
role*string
Value in"athlete" | "coach"
sendInvitationEmail?boolean

If true, Vekta emails the code to the person. Defaults to false.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/workspaces/wke_01JGXW3KQ2B8C4D5E6F7G8H9J0/invitations" \  -H "Content-Type: application/json" \  -d '{    "email": "athlete@example.com",    "role": "athlete"  }'
{  "id": "win_01JK4W2N9XQ3F5H7B8C6D2E9GT",  "email": "athlete@example.com",  "role": "athlete",  "code": "7XK2QW",  "expiresAt": "2026-08-28T09:30:00.000Z"}