GET /api/v4/invites
List of workspace invites

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "invites": [],
  "my_invites": [
    {
      "id": 2,
      "name": "scrumLaunch team",
      "email": "kruchina.vadim+1@gmail.com",
      "state": "pending",
      "created_at": "2022-01-07T21:39:11.637Z",
      "sender_email": "kruchina.vadim@gmail.com",
      "sender_avatar_image_link": "https://gipper-college-logos-development.s3.amazonaws.com/s3_key"
    }
  ]
}

GET /api/v4/invites/:id
Checking for existence of an invite. Last update: 03/08/23

Success response body

{
  "success": true,
  "data": {
    "id": 50,
    "state": "pending",
    "created_at": "2023-07-21T13:03:57.226Z",
    "user": {
      "id": 94,
      "email": "kruchina.vadim+1@gmail.com",
      "first_name": null,
      "last_name": null
    },
    "sender": {
      "id": 1,
      "email": "kruchina.vadim@gmail.com",
      "first_name": "11",
      "last_name": "1"
    },
    "workspace": {
      "id": 1,
      "name": "1",
      "organization_type": "Club/Youth Sports",
      "workspace_logo": {
        "id": 25,
        "s3_key": null,
        "format_type": null
      },
      "owner": {
        "id": 1,
        "email": "kruchina.vadim@gmail.com",
        "full_name": "1 1"
      }
    }
  }
}

Params

Param name Description
id
required

Current invite ID

Validations:

  • Must be a Integer


POST /api/v4/invites
Create invite to workspace. Last update: 29/10/24

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  "user_emails": [
    "sample_email@gmail.com",
    ...
  ],
  location: progressMeter
}

Success response body

{
  "successfully_invited_users": [
    "kruchina.vadim+3@gmail.com",
    ...
  ],
  "already_invited_users": [
    "kruchina.vadim+2@gmail.com",
    ...
  ],
  "already_on_workspace": [
    "kruchina.vadim+1@gmail.com",
    ...
  ],
  "invalid_emails": [
    "invalid_email@gmail.com",
    ...
  ]
}

Params

Param name Description
user_emails
required

Array of user emails

Validations:

  • Must be an array of String

location
optional

Validations:

  • Must be one of: workspaceSettingsPage, signUpForm, guidedWalkthrough, progressMeter, templateBranding.


DELETE /api/v4/invites/:id
Delete invite. Last update: 29/10/24

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": true
}

Params

Param name Description
id
required

Current invite ID

Validations:

  • Must be a Integer


GET /api/v4/invites/:id/resend_email
Resend invite`s email

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": "true"
}

Params

Param name Description
id
required

Current invite ID

Validations:

  • Must be a Integer


PUT /api/v4/invites/:id/accept
Accept invite

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": true,
  "message": "Invite was successfully accepted."
}

Error response body

# 404
{
  "success": false,
  "message": "Invite not found"
}
# 422
{
  "success": false,
  "message": "you can not update super admin"
}
OR
{
  "success": false,
  "message": "Validation failed: Workspace has enough members"
}

Params

Param name Description
id
required

Current invite ID

Validations:

  • Must be a Integer


PUT /api/v4/invites/:id/decline
Decline invite

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": true,
  "message": "Invite was successfully declined."
}

Error response body

{
  "success": false,
  "message": "Invite not found"
}

Params

Param name Description
id
required

Current invite ID

Validations:

  • Must be a Integer