Teams > Membership

Reads all Memberships

Changed on

Get all memberships.

get/api/2026-10-01/resources/teams/memberships

Request

  • Base URL
    https://api.factorialhr.com
  • URL
    https://api.factorialhr.com/api/2026-10-01/resources/teams/memberships
  • Auth
    • OAuth 2
      Authorization code: https://id.factorialhr.com/oauth/authorize
      Token URL: https://id.factorialhr.com/api/oauth/token scopes: employees
    • or API key in header x-api-key

Query parameters

ids[]string[]

Return only the memberships with these ids.

[
  "1",
  "2",
  "3"
]
leadboolean

Whether the employee is a lead of the team or not

Example:true
team_ids[]string[]

Return only the memberships of these teams.

[
  "3",
  "5",
  "7"
]
employee_ids[]string[]

Return only the memberships of these employees.

[
  "10",
  "12",
  "13"
]
with_source_attributionboolean

Populate direct, source_team_ids and parent_team_ids on each returned membership (nested teams). Only honoured when filtering by a single employee_ids value without team_ids — the read that attributes one employee's own memberships, and the only one that resolves direct. Reads filtered by a single team already return source_team_ids/parent_team_ids without this flag (direct stays null there); bulk reads ignore it entirely. Unsupported filter combinations return 200 with empty attribution rather than an error. Attribution is resolved per employee and is significantly more expensive than a plain read: intended for per-profile lookups, not bulk synchronization.

Response

OK

Example response

{
  "data": [
    {
      "id": "1",
      "company_id": "1",
      "employee_id": "12",
      "team_id": "3",
      "lead": true,
      "source_team_ids": [
        "3"
      ],
      "parent_team_ids": [
        "2"
      ]
    }
  ]
}

Changes