Organization Invites

List organization invites

get

Gets the list of all invites for the specified organization

Path parameters
organisationIdstring · uuidRequired

Unique ID of the organization

Example: 123e4567-e89b-12d3-a456-426614174000
Query parameters
pageinteger · min: 1Optional

Page number for pagination

Default: 1Example: 1
limitinteger · min: 1 · max: 100Optional

Number of items per page

Default: 20Example: 20
statusstring · enumOptional

Filter by invite status

Example: pendingPossible values:
typestring · enumOptional

Filter by invite type

Example: memberPossible values:
Responses
200

List of invites retrieved successfully

application/json
get
GET /memberships/orgs/{organisationId}/invites HTTP/1.1
Host: api.example.com
Accept: */*
{
  "data": [
    {
      "id": "invite123-def6-7890-abcd-ef1234567890",
      "code": "ABC12345",
      "type": "member",
      "channel": "email",
      "status": "pending",
      "organisationId": "123e4567-e89b-12d3-a456-426614174000",
      "channelRouting": {
        "email": "john.doe@example.com"
      },
      "details": {
        "member": {
          "title": "Mr.",
          "displayName": "John Doe",
          "orgScopes": [
            "read",
            "write"
          ],
          "orgRoles": [
            "member"
          ]
        }
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "expiresAt": "2024-02-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "totalPages": 1,
    "hasNext": false,
    "hasPrev": false
  }
}

Create an invitation

post

Creates a new invitation to the organization, collective, or team

Path parameters
organisationIdstring · uuidRequired

Unique ID of the organization

Example: 123e4567-e89b-12d3-a456-426614174000
Body
typestring · enumRequired

Type of invitation

Example: memberPossible values:
channelstring · enumRequired

Communication channel for the invitation

Example: emailPossible values:
detailsobjectRequired

Detailed information about the invitation based on type

customMessagestring · max: 500Optional

Custom message to include in the invitation

Example: Welcome to our team!
expiresAtstring · date-timeOptional

When the invitation expires (defaults to 30 days)

Example: 2024-02-15T10:30:00Z
Responses
201

Invitation created successfully

application/json
post
POST /memberships/orgs/{organisationId}/invites HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: */*
Content-Length: 296

{
  "type": "member",
  "channel": "email",
  "details": {
    "member": {
      "title": "Mr.",
      "displayName": "John Doe",
      "orgScopes": [
        "read",
        "write",
        "delete"
      ],
      "orgRoles": [
        "admin"
      ]
    }
  },
  "channelRouting": {
    "email": "john.doe@example.com"
  },
  "customMessage": "Welcome to Bloque! We're excited to have you join our engineering team."
}
{
  "id": "invite123-def6-7890-abcd-ef1234567890",
  "code": "ABC12345",
  "type": "member",
  "channel": "email",
  "status": "pending",
  "organisationId": "123e4567-e89b-12d3-a456-426614174000",
  "channelRouting": {
    "email": "john.doe@example.com"
  },
  "details": {
    "member": {
      "title": "Mr.",
      "displayName": "John Doe",
      "orgScopes": [
        "read",
        "write",
        "delete"
      ],
      "orgRoles": [
        "admin"
      ]
    }
  },
  "customMessage": "Welcome to Bloque! We're excited to have you join our engineering team.",
  "createdAt": "2024-01-15T10:30:00Z",
  "expiresAt": "2024-02-15T10:30:00Z"
}

Get invite information

get

Gets the information of a specific invite

Path parameters
organisationIdstring · uuidRequired

Unique ID of the organization

Example: 123e4567-e89b-12d3-a456-426614174000
inviteIdstring · uuidRequired

Unique ID of the invite

Example: invite123-def6-7890-abcd-ef1234567890
Responses
200

Invite information retrieved successfully

application/json
get
GET /memberships/orgs/{organisationId}/invites/{inviteId} HTTP/1.1
Host: api.example.com
Accept: */*
{
  "id": "invite123-def6-7890-abcd-ef1234567890",
  "code": "ABC12345",
  "type": "team",
  "channel": "email",
  "status": "pending",
  "organisationId": "123e4567-e89b-12d3-a456-426614174000",
  "channelRouting": {
    "email": "alex.johnson@example.com"
  },
  "details": {
    "team": {
      "teamId": "team123-def6-7890-abcd-ef1234567890",
      "teamScopes": [
        "read",
        "write"
      ],
      "teamRoles": [
        "lead"
      ]
    },
    "member": {
      "title": "Dr.",
      "displayName": "Alex Johnson"
    }
  },
  "customMessage": "Lead our engineering team to new heights!",
  "createdAt": "2024-01-15T10:30:00Z",
  "expiresAt": "2024-02-15T10:30:00Z"
}

Update invite information

put

Updates the information of a specific invite (only pending invites)

Path parameters
organisationIdstring · uuidRequired

Unique ID of the organization

Example: 123e4567-e89b-12d3-a456-426614174000
inviteIdstring · uuidRequired

Unique ID of the invite

Example: invite123-def6-7890-abcd-ef1234567890
Body
customMessagestring · max: 500Optional

Updated custom message

Example: Updated invitation message
expiresAtstring · date-timeOptional

Updated expiration date

Example: 2024-03-15T10:30:00Z
Responses
200

Invite updated successfully

application/json
put
PUT /memberships/orgs/{organisationId}/invites/{inviteId} HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: */*
Content-Length: 128

{
  "customMessage": "Updated message: We've expanded your role! Join us as a senior team lead.",
  "expiresAt": "2024-03-15T10:30:00Z"
}
{
  "id": "invite123-def6-7890-abcd-ef1234567890",
  "code": "ABC12345",
  "type": "team",
  "channel": "email",
  "status": "pending",
  "organisationId": "123e4567-e89b-12d3-a456-426614174000",
  "channelRouting": {
    "email": "alex.johnson@example.com"
  },
  "details": {
    "team": {
      "teamId": "team123-def6-7890-abcd-ef1234567890",
      "teamScopes": [
        "read",
        "write"
      ],
      "teamRoles": [
        "lead"
      ]
    },
    "member": {
      "title": "Dr.",
      "displayName": "Alex Johnson"
    }
  },
  "customMessage": "Updated message: We've expanded your role! Join us as a senior team lead.",
  "createdAt": "2024-01-15T10:30:00Z",
  "expiresAt": "2024-03-15T10:30:00Z"
}

Cancel an invite

delete

Cancels a specific invite (only pending invites)

Path parameters
organisationIdstring · uuidRequired

Unique ID of the organization

Example: 123e4567-e89b-12d3-a456-426614174000
inviteIdstring · uuidRequired

Unique ID of the invite to cancel

Example: invite123-def6-7890-abcd-ef1234567890
Responses
200

Invite cancelled successfully

application/json
delete
DELETE /memberships/orgs/{organisationId}/invites/{inviteId} HTTP/1.1
Host: api.example.com
Accept: */*
{
  "success": true,
  "message": "Invite successfully cancelled"
}