Skip to main content
GET
https://api.bunship.com
/
api
/
v1
/
organizations
/
{orgId}
/
invitations
List Invitations
curl --request GET \
  --url https://api.bunship.com/api/v1/organizations/{orgId}/invitations \
  --header 'Authorization: Bearer <token>'
{
  "invitations": [
    {
      "id": "inv_abc123",
      "organizationId": "org_cld2abc123def456",
      "email": "[email protected]",
      "role": "member",
      "invitedBy": {
        "id": "usr_cld2abc123def456",
        "email": "[email protected]",
        "fullName": "John Doe"
      },
      "expiresAt": "2024-01-22T10:00:00Z",
      "createdAt": "2024-01-15T10:00:00Z",
      "status": "pending"
    }
  ],
  "total": 1
}
Returns all pending invitations for the organization, including the inviter’s details and current status. Requires the invitations:read permission.

Auth

Requires a valid Bearer token with invitations:read permission.

Path Parameters

orgId
string
required
Organization identifier.

Response

invitations
array
Array of invitation objects.
total
number
Total number of invitations.
{
  "invitations": [
    {
      "id": "inv_abc123",
      "organizationId": "org_cld2abc123def456",
      "email": "[email protected]",
      "role": "member",
      "invitedBy": {
        "id": "usr_cld2abc123def456",
        "email": "[email protected]",
        "fullName": "John Doe"
      },
      "expiresAt": "2024-01-22T10:00:00Z",
      "createdAt": "2024-01-15T10:00:00Z",
      "status": "pending"
    }
  ],
  "total": 1
}

Errors

StatusCodeDescription
401AUTHENTICATION_ERRORMissing or invalid Bearer token
403AUTHORIZATION_ERRORInsufficient permissions (invitations:read required)
404NOT_FOUNDOrganization not found

Example

curl https://api.bunship.com/api/v1/organizations/org_cld2abc123def456/invitations \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."