List organization invitations

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
GET /organization/invitations

Lists invitations of every organization the caller belongs to, or of the one in the organization query (403 when the caller is not a member of it), filterable by text, status and role; paginated, most recently updated first. Inviting, invited and accepting users and the organization come as objects. data is null, not an empty array, when nothing matches.

Headers

  • organization string Required

    id of the selected (active) organization

Query parameters

  • page number

    Default value is 1.

  • perPage number

    Default value is 10.

  • skip number

    If skip/limit not provided, page/perPage will take precedence

  • limit number

    If skip/limit not provided, page/perPage will take precedence

  • sortOrder string

    Values are asc or desc. Default value is asc.

  • searchText string

    Minimum length is 3, maximum length is 100.

  • status string

    Values are pending, accepted, or rejected.

  • userRole string

    Values are user, client, employee, billing, full_access, admin, owner, or member.

  • sortBy string

    Values are createdAt, updatedAt, or email. Default value is updatedAt.

  • organization string

    Limit to one of your organizations (defaults to all of them)

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • total number Required
      • page number
      • perPage number
      • skip number
      • limit number
      • totalPages number Required
      • nextPage number | null Required
      • previousPage number | null Required
      • data array[object] Required
        Hide data attributes Show data attributes object
        • createdAt string(date-time) Required
        • updatedAt string(date-time) Required
        • id string Required
        • invitedUserEmail string Required
        • invitedUserName string Required
        • invitedUserPhone array[string] Required

          Phone numbers stored on the invitation. No invite flow fills it today, so it is an empty list.

        • invitedBy object Required

          The full record on routes that load it; null (or an empty list) on routes that do not.

          Hide invitedBy attributes Show invitedBy attributes object
          • createdAt string(date-time) Required
          • updatedAt string(date-time) Required
          • id string Required
          • name string Required
          • email string Required
          • phone array[string] Required
          • isActive boolean Required
          • isEmailVerified boolean Required
          • lastActive string(date-time) Required
          • roles array[string] Required
          • avatar object Required

            The full record on routes that load it; null (or an empty list) on routes that do not.

            Hide avatar attributes Show avatar attributes object
            • createdAt string(date-time) Required
            • updatedAt string(date-time) Required
            • id string Required
            • name string Required
            • providerId string Required
            • convertedName string | null Required
            • convertedProviderId string Required
            • provider string Required
            • size number Required

              Size in bytes

            • transferState number | null Required
          • onboardingStatus string | null Required
          • userType string | null Required
          • firstName string Required
          • lastName string Required
          • initials string Required
          • userOrganizations array[object]

            Only filled on the signed-in user's own profile; absent or empty on a user nested in another record.

        • organization object Required

          The full record on routes that load it; null (or an empty list) on routes that do not.

          Hide organization attributes Show organization attributes object
          • createdAt string(date-time) Required
          • updatedAt string(date-time) Required
          • id string Required
          • name string Required
          • slug string Required
          • email string Required
          • contact string Required
          • city string Required
          • state string Required
          • country string Required
          • description string Required
          • phone array[string] Required
          • isActive boolean Required
          • isPriority boolean
          • activePlan object Required

            The full record on routes that load it; null (or an empty list) on routes that do not.

            Hide activePlan attributes Show activePlan attributes object
            • createdAt string(date-time) Required
            • updatedAt string(date-time) Required
            • id string Required
            • subscription object | null Required

              Not loaded on public routes, so always null there. Only the internal admin organization report loads it.

            • relatedSubscription array[object] | null Required

              Not loaded by any route, so always null or an empty list.

            • organization object | null Required

              Not loaded by any route, so always null.

            • seats number Required
            • seatsUsed number Required
            • devices number Required
            • deviceUsed number Required
            • storage number Required

              Storage in bytes

            • storageUsed number Required

              Storage used in bytes

            • payments array[object] | null Required

              Not loaded by any route, so always null or an empty list.

            • type string Required

              Values are admin, free, limited-access, trial, tier1, tier2, tier3, tier4, tier5, tier6, or tier7.

            • isActive boolean Required
            • isBetweenPlanChanges boolean Required
            • storageInKb number Required
            • storageUsedInKb number Required
            • storageInMb number Required
            • storageUsedInMb number Required
            • storageInGb number Required
            • storageUsedInGb number Required
            • storageInTb number Required
            • storageUsedInTb number Required
            • isFreePlan boolean Required
            • remainingSeats number Required
            • remainingDevices number Required
            • remainingStorage number Required

              Storage left in bytes (storage minus storageUsed).

          • metadata object Required
          • type string Required
          • version string Required

            Values are v1, v2, eu, or ca.

        • invitedUserRole string Required

          Values are user, client, employee, billing, full_access, admin, owner, or member.

        • status string Required

          Values are pending, accepted, or rejected.

        • emailSent boolean Required
        • emailSentAt string(date-time) | null Required
        • acceptedAt string(date-time) | null Required
        • acceptedBy object Required

          The full record on routes that load it; null (or an empty list) on routes that do not.

          Hide acceptedBy attributes Show acceptedBy attributes object
          • createdAt string(date-time) Required
          • updatedAt string(date-time) Required
          • id string Required
          • name string Required
          • email string Required
          • phone array[string] Required
          • isActive boolean Required
          • isEmailVerified boolean Required
          • lastActive string(date-time) Required
          • roles array[string] Required
          • avatar object Required

            The full record on routes that load it; null (or an empty list) on routes that do not.

            Hide avatar attributes Show avatar attributes object
            • createdAt string(date-time) Required
            • updatedAt string(date-time) Required
            • id string Required
            • name string Required
            • providerId string Required
            • convertedName string | null Required
            • convertedProviderId string Required
            • provider string Required
            • size number Required

              Size in bytes

            • transferState number | null Required
          • onboardingStatus string | null Required
          • userType string | null Required
          • firstName string Required
          • lastName string Required
          • initials string Required
          • userOrganizations array[object]

            Only filled on the signed-in user's own profile; absent or empty on a user nested in another record.

        • invitedUser object Required

          The full record on routes that load it; null (or an empty list) on routes that do not.

          Hide invitedUser attributes Show invitedUser attributes object
          • createdAt string(date-time) Required
          • updatedAt string(date-time) Required
          • id string Required
          • name string Required
          • email string Required
          • phone array[string] Required
          • isActive boolean Required
          • isEmailVerified boolean Required
          • lastActive string(date-time) Required
          • roles array[string] Required
          • avatar object Required

            The full record on routes that load it; null (or an empty list) on routes that do not.

            Hide avatar attributes Show avatar attributes object
            • createdAt string(date-time) Required
            • updatedAt string(date-time) Required
            • id string Required
            • name string Required
            • providerId string Required
            • convertedName string | null Required
            • convertedProviderId string Required
            • provider string Required
            • size number Required

              Size in bytes

            • transferState number | null Required
          • onboardingStatus string | null Required
          • userType string | null Required
          • firstName string Required
          • lastName string Required
          • initials string Required
          • userOrganizations array[object]

            Only filled on the signed-in user's own profile; absent or empty on a user nested in another record.

        • rejectedAt string(date-time) | null Required
        • rejectedReason string | null Required
        • initials string Required
    • statusCode number Required
    • timestamp string(date-time) Required
GET /organization/invitations
curl \
 --request GET 'http://api.example.com/organization/invitations' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "organization: string"
Response examples (200)
{
  "data": {
    "total": 42,
    "page": 1,
    "perPage": 20,
    "skip": 0,
    "limit": 20,
    "totalPages": 3,
    "nextPage": 2,
    "previousPage": 42.0,
    "data": [
      {
        "createdAt": "2026-01-15T14:30:00.000Z",
        "updatedAt": "2026-01-15T14:30:00.000Z",
        "id": "507f1f77bcf86cd799439011",
        "invitedUserEmail": "jane.doe@example.com",
        "invitedUserName": "Jane Doe",
        "invitedUserPhone": [
          "+15555550100"
        ],
        "invitedBy": {
          "createdAt": "2026-01-15T14:30:00.000Z",
          "updatedAt": "2026-01-15T14:30:00.000Z",
          "id": "507f1f77bcf86cd799439011",
          "name": "Jane Doe",
          "email": "jane.doe@example.com",
          "phone": [
            "+15555550100"
          ],
          "isActive": true,
          "isEmailVerified": true,
          "lastActive": "2026-01-15T14:30:00.000Z",
          "roles": [
            "user"
          ],
          "avatar": {
            "createdAt": "2026-01-15T14:30:00.000Z",
            "updatedAt": "2026-01-15T14:30:00.000Z",
            "id": "507f1f77bcf86cd799439011",
            "name": "photo.heic",
            "providerId": "uploads/507f1f77bcf86cd799439011/photo.heic",
            "convertedName": "photo.jpg",
            "convertedProviderId": "uploads/507f1f77bcf86cd799439011/photo.jpg",
            "provider": "s3",
            "size": 204800,
            "transferState": 42.0
          },
          "onboardingStatus": "completed",
          "userType": "attorney",
          "firstName": "Jane",
          "lastName": "Doe",
          "initials": "JD",
          "userOrganizations": [
            {}
          ]
        },
        "organization": {
          "createdAt": "2026-01-15T14:30:00.000Z",
          "updatedAt": "2026-01-15T14:30:00.000Z",
          "id": "507f1f77bcf86cd799439011",
          "name": "Example Law LLP",
          "slug": "example-law-llp",
          "email": "office@example.com",
          "contact": "Jane Doe",
          "city": "New York",
          "state": "NY",
          "country": "US",
          "description": "Litigation practice",
          "phone": [
            "+15555550100"
          ],
          "logo": "https://files.example.com/logo.png",
          "isActive": true,
          "isPriority": false,
          "activePlan": {
            "createdAt": "2026-01-15T14:30:00.000Z",
            "updatedAt": "2026-01-15T14:30:00.000Z",
            "id": "507f1f77bcf86cd799439011",
            "subscription": {},
            "relatedSubscription": [
              {}
            ],
            "organization": {},
            "seats": 5,
            "seatsUsed": 3,
            "devices": 10,
            "deviceUsed": 4,
            "storage": 100000000000,
            "storageUsed": 12000000000,
            "payments": [
              {}
            ],
            "type": "admin",
            "isActive": true,
            "isBetweenPlanChanges": false,
            "storageInKb": 100000000,
            "storageUsedInKb": 12000000,
            "storageInMb": 100000,
            "storageUsedInMb": 12000,
            "storageInGb": 100,
            "storageUsedInGb": 12,
            "storageInTb": 0.1,
            "storageUsedInTb": 0.012,
            "isFreePlan": false,
            "remainingSeats": 2,
            "remainingDevices": 6,
            "remainingStorage": 88000000000
          },
          "metadata": {},
          "type": "law_firm",
          "version": "v1"
        },
        "invitedUserRole": "member",
        "status": "pending",
        "emailSent": false,
        "emailSentAt": "2026-05-04T09:42:00Z",
        "acceptedAt": "2026-05-04T09:42:00Z",
        "acceptedBy": {
          "createdAt": "2026-01-15T14:30:00.000Z",
          "updatedAt": "2026-01-15T14:30:00.000Z",
          "id": "507f1f77bcf86cd799439011",
          "name": "Jane Doe",
          "email": "jane.doe@example.com",
          "phone": [
            "+15555550100"
          ],
          "isActive": true,
          "isEmailVerified": true,
          "lastActive": "2026-01-15T14:30:00.000Z",
          "roles": [
            "user"
          ],
          "avatar": {
            "createdAt": "2026-01-15T14:30:00.000Z",
            "updatedAt": "2026-01-15T14:30:00.000Z",
            "id": "507f1f77bcf86cd799439011",
            "name": "photo.heic",
            "providerId": "uploads/507f1f77bcf86cd799439011/photo.heic",
            "convertedName": "photo.jpg",
            "convertedProviderId": "uploads/507f1f77bcf86cd799439011/photo.jpg",
            "provider": "s3",
            "size": 204800,
            "transferState": 42.0
          },
          "onboardingStatus": "completed",
          "userType": "attorney",
          "firstName": "Jane",
          "lastName": "Doe",
          "initials": "JD",
          "userOrganizations": [
            {}
          ]
        },
        "invitedUser": {
          "createdAt": "2026-01-15T14:30:00.000Z",
          "updatedAt": "2026-01-15T14:30:00.000Z",
          "id": "507f1f77bcf86cd799439011",
          "name": "Jane Doe",
          "email": "jane.doe@example.com",
          "phone": [
            "+15555550100"
          ],
          "isActive": true,
          "isEmailVerified": true,
          "lastActive": "2026-01-15T14:30:00.000Z",
          "roles": [
            "user"
          ],
          "avatar": {
            "createdAt": "2026-01-15T14:30:00.000Z",
            "updatedAt": "2026-01-15T14:30:00.000Z",
            "id": "507f1f77bcf86cd799439011",
            "name": "photo.heic",
            "providerId": "uploads/507f1f77bcf86cd799439011/photo.heic",
            "convertedName": "photo.jpg",
            "convertedProviderId": "uploads/507f1f77bcf86cd799439011/photo.jpg",
            "provider": "s3",
            "size": 204800,
            "transferState": 42.0
          },
          "onboardingStatus": "completed",
          "userType": "attorney",
          "firstName": "Jane",
          "lastName": "Doe",
          "initials": "JD",
          "userOrganizations": [
            {}
          ]
        },
        "rejectedAt": "2026-05-04T09:42:00Z",
        "rejectedReason": "Already joined another organization.",
        "initials": "JD"
      }
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}