# Organization

Your organization, its people and its pending invitations.



{/* Generated from openapi/openapi.yaml by `npm run gen:api-docs`. Do not edit by hand. */}

<ApiEndpoint>
  <ApiEndpointMain>
    ## Get your organization [#get-your-organization]

    <ApiEndpointHeader method="GET" path="/v1/org" scope="org:read" />

    <ApiParams title="Headers">
      <ApiParam name="HQ-Version" type="string (date)">
        A dated API version. Defaults to the version the key was created with.
      </ApiParam>

      <ApiParam name="HQ-Account" type="string">
        Agency keys only: the slug of the client organization this request acts for. Required with
        an agency key, refused with `400 invalid_request` on any other credential. A slug that is
        not one of your agency's current clients is `404 not_found`. An agency key is limited to
        600 requests a minute per key on EACH API server (the cap is per replica), plus its own
        budget per client (`limit_scope: agency_client`), separate from the client's own keys.
      </ApiParam>
    </ApiParams>

    **Returns** a [Org](#org) object.

    <ApiParams title="Responses">
      <ApiParam name="200">
        The organization.
      </ApiParam>

      <ApiParam name="Other">
        An RFC 9457 problem.
      </ApiParam>
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    <Tabs items="['cURL', 'JavaScript', 'Python']">
      <Tab value="cURL">
        ```bash
        curl https://api-hq.aiworkforceone.com/v1/org \
          -H "Authorization: Bearer $HQ_API_KEY" \
          -H "HQ-Version: 2026-11-01"
        ```
      </Tab>

      <Tab value="JavaScript">
        ```js
        const res = await fetch('https://api-hq.aiworkforceone.com/v1/org', {
          headers: {
            Authorization: `Bearer ${process.env['HQ_API_KEY']}`,
            'HQ-Version': '2026-11-01',
          },
        });
        console.log(await res.json());
        ```
      </Tab>

      <Tab value="Python">
        ```python
        import os

        import requests

        res = requests.get(
            "https://api-hq.aiworkforceone.com/v1/org",
            headers={
                "Authorization": f"Bearer {os.environ['HQ_API_KEY']}",
                "HQ-Version": "2026-11-01",
            },
        )
        print(res.json())
        ```
      </Tab>
    </Tabs>

    ```json title="Response 200"
    {
      "object": "org",
      "id": "org_3SvwLF4ulih8bHz5KtmNOO",
      "name": "Acme Robotics",
      "slug": "acme",
      "plan": "growth",
      "plan_status": "active",
      "trial_ends_at": null,
      "current_period_end": "2026-11-28T00:00:00.000Z",
      "cancel_at_period_end": false,
      "created_at": "2026-03-04T11:20:00.000Z"
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ## Get the org chart [#get-the-org-chart]

    <ApiEndpointHeader method="GET" path="/v1/org/chart" scope="org:chart.read" />

    People, AI teams and who each team reports to. Emails only for an admin's key.
    On an AI team that turned on Protected files, a key that lacks `files:protected.read` (or whose person lacks it) gets `ai_employee_count` and `skill_count` as null for that team.

    <ApiParams title="Headers">
      <ApiParam name="HQ-Version" type="string (date)">
        A dated API version. Defaults to the version the key was created with.
      </ApiParam>

      <ApiParam name="HQ-Account" type="string">
        Agency keys only: the slug of the client organization this request acts for. Required with
        an agency key, refused with `400 invalid_request` on any other credential. A slug that is
        not one of your agency's current clients is `404 not_found`. An agency key is limited to
        600 requests a minute per key on EACH API server (the cap is per replica), plus its own
        budget per client (`limit_scope: agency_client`), separate from the client's own keys.
      </ApiParam>
    </ApiParams>

    **Returns** a [OrgChart](#orgchart) object.

    <ApiParams title="Responses">
      <ApiParam name="200">
        The org chart.
      </ApiParam>

      <ApiParam name="Other">
        An RFC 9457 problem.
      </ApiParam>
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    <Tabs items="['cURL', 'JavaScript', 'Python']">
      <Tab value="cURL">
        ```bash
        curl https://api-hq.aiworkforceone.com/v1/org/chart \
          -H "Authorization: Bearer $HQ_API_KEY" \
          -H "HQ-Version: 2026-11-01"
        ```
      </Tab>

      <Tab value="JavaScript">
        ```js
        const res = await fetch('https://api-hq.aiworkforceone.com/v1/org/chart', {
          headers: {
            Authorization: `Bearer ${process.env['HQ_API_KEY']}`,
            'HQ-Version': '2026-11-01',
          },
        });
        console.log(await res.json());
        ```
      </Tab>

      <Tab value="Python">
        ```python
        import os

        import requests

        res = requests.get(
            "https://api-hq.aiworkforceone.com/v1/org/chart",
            headers={
                "Authorization": f"Bearer {os.environ['HQ_API_KEY']}",
                "HQ-Version": "2026-11-01",
            },
        )
        print(res.json())
        ```
      </Tab>
    </Tabs>

    ```json title="Response 200"
    {
      "object": "org_chart",
      "owners": [
        {
          "id": "user_yFfQdB3rxA41x3cTD5fx2Q",
          "name": "Maya Chen",
          "email": "maya.chen@example.com",
          "title": "CTO"
        }
      ],
      "people": [
        {
          "id": "user_82yssFqK4JG6pUfKfe95V3",
          "name": "Sam Okafor",
          "email": "sam.okafor@example.com",
          "title": "Platform lead",
          "role": "admin"
        }
      ],
      "pending_invites": [
        {
          "id": "inv_osw5IZUY55lbPHG4sHWkxl",
          "email": "priya.patel@example.com",
          "role": "member",
          "title": "Data analyst"
        }
      ],
      "teams": [
        {
          "team": "team_3kQ9vX2mR8tLpZ4wYc1aBd",
          "name": "Research",
          "engine": "claude",
          "reports_to": [
            {
              "user": "user_82yssFqK4JG6pUfKfe95V3",
              "role": "owner"
            }
          ],
          "ai_employee_count": 3,
          "skill_count": 12,
          "running_sessions": 2,
          "schedule_count": 4,
          "next_run_at": "2026-10-19T07:00:00.000Z"
        }
      ]
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ## List members [#list-members]

    <ApiEndpointHeader method="GET" path="/v1/members" scope="members:read" />

    <ApiParams title="Query parameters">
      <ApiParam name="limit" type="integer">
        How many objects to return, 1 to 100. Default 20.
      </ApiParam>

      <ApiParam name="starting_after" type="string">
        Return objects older than this id (the next page).
      </ApiParam>

      <ApiParam name="ending_before" type="string">
        Return objects newer than this id (the previous page).
      </ApiParam>

      <ApiParam name="role" type="string">
        Only members with this role. One of `owner`, `admin`, `member`.
      </ApiParam>
    </ApiParams>

    <ApiParams title="Headers">
      <ApiParam name="HQ-Version" type="string (date)">
        A dated API version. Defaults to the version the key was created with.
      </ApiParam>

      <ApiParam name="HQ-Account" type="string">
        Agency keys only: the slug of the client organization this request acts for. Required with
        an agency key, refused with `400 invalid_request` on any other credential. A slug that is
        not one of your agency's current clients is `404 not_found`. An agency key is limited to
        600 requests a minute per key on EACH API server (the cap is per replica), plus its own
        budget per client (`limit_scope: agency_client`), separate from the client's own keys.
      </ApiParam>
    </ApiParams>

    **Returns** a list of [Member](#member) objects.

    <ApiParams title="Responses">
      <ApiParam name="200">
        A page of members.
      </ApiParam>

      <ApiParam name="Other">
        An RFC 9457 problem.
      </ApiParam>
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    <Tabs items="['cURL', 'JavaScript', 'Python']">
      <Tab value="cURL">
        ```bash
        curl https://api-hq.aiworkforceone.com/v1/members \
          -H "Authorization: Bearer $HQ_API_KEY" \
          -H "HQ-Version: 2026-11-01"
        ```
      </Tab>

      <Tab value="JavaScript">
        ```js
        const res = await fetch('https://api-hq.aiworkforceone.com/v1/members', {
          headers: {
            Authorization: `Bearer ${process.env['HQ_API_KEY']}`,
            'HQ-Version': '2026-11-01',
          },
        });
        console.log(await res.json());
        ```
      </Tab>

      <Tab value="Python">
        ```python
        import os

        import requests

        res = requests.get(
            "https://api-hq.aiworkforceone.com/v1/members",
            headers={
                "Authorization": f"Bearer {os.environ['HQ_API_KEY']}",
                "HQ-Version": "2026-11-01",
            },
        )
        print(res.json())
        ```
      </Tab>
    </Tabs>

    ```json title="Response 200"
    {
      "object": "list",
      "data": [
        {
          "object": "member",
          "id": "user_82yssFqK4JG6pUfKfe95V3",
          "name": "Sam Okafor",
          "email": "sam.okafor@example.com",
          "role": "admin",
          "title": "Platform lead",
          "two_factor_enabled": true,
          "joined_at": "2026-03-09T15:41:02.000Z",
          "last_login_at": "2026-10-14T08:03:57.000Z"
        }
      ],
      "has_more": false
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ## Get a member [#get-a-member]

    <ApiEndpointHeader method="GET" path="/v1/members/{user_id}" scope="members:read" />

    <ApiParams title="Path parameters">
      <ApiParam name="user_id" type="string" required="true">
        A member's user id.
      </ApiParam>
    </ApiParams>

    <ApiParams title="Headers">
      <ApiParam name="HQ-Version" type="string (date)">
        A dated API version. Defaults to the version the key was created with.
      </ApiParam>

      <ApiParam name="HQ-Account" type="string">
        Agency keys only: the slug of the client organization this request acts for. Required with
        an agency key, refused with `400 invalid_request` on any other credential. A slug that is
        not one of your agency's current clients is `404 not_found`. An agency key is limited to
        600 requests a minute per key on EACH API server (the cap is per replica), plus its own
        budget per client (`limit_scope: agency_client`), separate from the client's own keys.
      </ApiParam>
    </ApiParams>

    **Returns** a [Member](#member) object.

    <ApiParams title="Responses">
      <ApiParam name="200">
        The member.
      </ApiParam>

      <ApiParam name="Other">
        An RFC 9457 problem.
      </ApiParam>
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    <Tabs items="['cURL', 'JavaScript', 'Python']">
      <Tab value="cURL">
        ```bash
        curl https://api-hq.aiworkforceone.com/v1/members/user_82yssFqK4JG6pUfKfe95V3 \
          -H "Authorization: Bearer $HQ_API_KEY" \
          -H "HQ-Version: 2026-11-01"
        ```
      </Tab>

      <Tab value="JavaScript">
        ```js
        const res = await fetch('https://api-hq.aiworkforceone.com/v1/members/user_82yssFqK4JG6pUfKfe95V3', {
          headers: {
            Authorization: `Bearer ${process.env['HQ_API_KEY']}`,
            'HQ-Version': '2026-11-01',
          },
        });
        console.log(await res.json());
        ```
      </Tab>

      <Tab value="Python">
        ```python
        import os

        import requests

        res = requests.get(
            "https://api-hq.aiworkforceone.com/v1/members/user_82yssFqK4JG6pUfKfe95V3",
            headers={
                "Authorization": f"Bearer {os.environ['HQ_API_KEY']}",
                "HQ-Version": "2026-11-01",
            },
        )
        print(res.json())
        ```
      </Tab>
    </Tabs>

    ```json title="Response 200"
    {
      "object": "member",
      "id": "user_82yssFqK4JG6pUfKfe95V3",
      "name": "Sam Okafor",
      "email": "sam.okafor@example.com",
      "role": "admin",
      "title": "Platform lead",
      "two_factor_enabled": true,
      "joined_at": "2026-03-09T15:41:02.000Z",
      "last_login_at": "2026-10-14T08:03:57.000Z"
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ## List pending invitations [#list-pending-invitations]

    <ApiEndpointHeader method="GET" path="/v1/invites" scope="members:read" />

    <ApiParams title="Query parameters">
      <ApiParam name="limit" type="integer">
        How many objects to return, 1 to 100. Default 20.
      </ApiParam>

      <ApiParam name="starting_after" type="string">
        Return objects older than this id (the next page).
      </ApiParam>

      <ApiParam name="ending_before" type="string">
        Return objects newer than this id (the previous page).
      </ApiParam>
    </ApiParams>

    <ApiParams title="Headers">
      <ApiParam name="HQ-Version" type="string (date)">
        A dated API version. Defaults to the version the key was created with.
      </ApiParam>

      <ApiParam name="HQ-Account" type="string">
        Agency keys only: the slug of the client organization this request acts for. Required with
        an agency key, refused with `400 invalid_request` on any other credential. A slug that is
        not one of your agency's current clients is `404 not_found`. An agency key is limited to
        600 requests a minute per key on EACH API server (the cap is per replica), plus its own
        budget per client (`limit_scope: agency_client`), separate from the client's own keys.
      </ApiParam>
    </ApiParams>

    **Returns** a list of [Invite](#invite) objects.

    <ApiParams title="Responses">
      <ApiParam name="200">
        A page of invitations.
      </ApiParam>

      <ApiParam name="Other">
        An RFC 9457 problem.
      </ApiParam>
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    <Tabs items="['cURL', 'JavaScript', 'Python']">
      <Tab value="cURL">
        ```bash
        curl https://api-hq.aiworkforceone.com/v1/invites \
          -H "Authorization: Bearer $HQ_API_KEY" \
          -H "HQ-Version: 2026-11-01"
        ```
      </Tab>

      <Tab value="JavaScript">
        ```js
        const res = await fetch('https://api-hq.aiworkforceone.com/v1/invites', {
          headers: {
            Authorization: `Bearer ${process.env['HQ_API_KEY']}`,
            'HQ-Version': '2026-11-01',
          },
        });
        console.log(await res.json());
        ```
      </Tab>

      <Tab value="Python">
        ```python
        import os

        import requests

        res = requests.get(
            "https://api-hq.aiworkforceone.com/v1/invites",
            headers={
                "Authorization": f"Bearer {os.environ['HQ_API_KEY']}",
                "HQ-Version": "2026-11-01",
            },
        )
        print(res.json())
        ```
      </Tab>
    </Tabs>

    ```json title="Response 200"
    {
      "object": "list",
      "data": [
        {
          "object": "invite",
          "id": "inv_osw5IZUY55lbPHG4sHWkxl",
          "email": "priya.patel@example.com",
          "role": "member",
          "title": "Data analyst",
          "invited_by": {
            "id": "user_yFfQdB3rxA41x3cTD5fx2Q",
            "name": "Maya Chen"
          },
          "created_at": "2026-10-13T10:00:00.000Z",
          "expires_at": "2026-10-20T10:00:00.000Z"
        }
      ],
      "has_more": false
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ## Invite someone [#invite-someone]

    <ApiEndpointHeader method="POST" path="/v1/invites" scope="members:invite" />

    Emails an invitation to join as a member or an admin (never an owner). The plan's seat limit applies (Professional has none),
    and the API sends at most a daily number of invitations per organization.
    A key restricted to some AI teams cannot do this (403 team_restricted). Inviting an admin needs members:role.assign in the key's own grant, which no API key can hold, so invite admins in HQ (403).

    <ApiParams title="Headers">
      <ApiParam name="Idempotency-Key" type="string">
        Makes a retry safe: the same key and body within 24 hours returns the first response again
        (`Idempotent-Replayed: true`); the same key with another body is 422.
      </ApiParam>

      <ApiParam name="HQ-Version" type="string (date)">
        A dated API version. Defaults to the version the key was created with.
      </ApiParam>

      <ApiParam name="HQ-Account" type="string">
        Agency keys only: the slug of the client organization this request acts for. Required with
        an agency key, refused with `400 invalid_request` on any other credential. A slug that is
        not one of your agency's current clients is `404 not_found`. An agency key is limited to
        600 requests a minute per key on EACH API server (the cap is per replica), plus its own
        budget per client (`limit_scope: agency_client`), separate from the client's own keys.
      </ApiParam>
    </ApiParams>

    <ApiParams title="Body parameters">
      <ApiParam name="email" type="string (email)" required="true" />

      <ApiParam name="role" type="string">
        One of `member`, `admin`.
      </ApiParam>

      <ApiParam name="title" type="string or null" />
    </ApiParams>

    **Returns** a [Invite](#invite) object.

    <ApiParams title="Responses">
      <ApiParam name="201">
        The invitation.
      </ApiParam>

      <ApiParam name="Other">
        An RFC 9457 problem.
      </ApiParam>
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    <Tabs items="['cURL', 'JavaScript', 'Python']">
      <Tab value="cURL">
        ```bash
        curl -X POST https://api-hq.aiworkforceone.com/v1/invites \
          -H "Authorization: Bearer $HQ_API_KEY" \
          -H "HQ-Version: 2026-11-01" \
          -H "Idempotency-Key: $(uuidgen)" \
          -H "Content-Type: application/json" \
          -d '{"email":"priya.patel@example.com"}'
        ```
      </Tab>

      <Tab value="JavaScript">
        ```js
        const res = await fetch('https://api-hq.aiworkforceone.com/v1/invites', {
          method: 'POST',
          headers: {
            Authorization: `Bearer ${process.env['HQ_API_KEY']}`,
            'HQ-Version': '2026-11-01',
            'Idempotency-Key': crypto.randomUUID(),
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({ email: 'priya.patel@example.com' }),
        });
        console.log(await res.json());
        ```
      </Tab>

      <Tab value="Python">
        ```python
        import os
        import uuid

        import requests

        res = requests.post(
            "https://api-hq.aiworkforceone.com/v1/invites",
            headers={
                "Authorization": f"Bearer {os.environ['HQ_API_KEY']}",
                "HQ-Version": "2026-11-01",
                "Idempotency-Key": str(uuid.uuid4()),
            },
            json={"email": "priya.patel@example.com"},
        )
        print(res.json())
        ```
      </Tab>
    </Tabs>

    ```json title="Response 201"
    {
      "object": "invite",
      "id": "inv_osw5IZUY55lbPHG4sHWkxl",
      "email": "priya.patel@example.com",
      "role": "member",
      "title": "Data analyst",
      "invited_by": {
        "id": "user_yFfQdB3rxA41x3cTD5fx2Q",
        "name": "Maya Chen"
      },
      "created_at": "2026-10-13T10:00:00.000Z",
      "expires_at": "2026-10-20T10:00:00.000Z"
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ## Revoke an invitation [#revoke-an-invitation]

    <ApiEndpointHeader method="DELETE" path="/v1/invites/{invite_id}" scope="members:invite" />

    <ApiParams title="Path parameters">
      <ApiParam name="invite_id" type="string" required="true">
        An invitation id.
      </ApiParam>
    </ApiParams>

    <ApiParams title="Headers">
      <ApiParam name="Idempotency-Key" type="string">
        Makes a retry safe: the same key and body within 24 hours returns the first response again
        (`Idempotent-Replayed: true`); the same key with another body is 422.
      </ApiParam>

      <ApiParam name="HQ-Version" type="string (date)">
        A dated API version. Defaults to the version the key was created with.
      </ApiParam>

      <ApiParam name="HQ-Account" type="string">
        Agency keys only: the slug of the client organization this request acts for. Required with
        an agency key, refused with `400 invalid_request` on any other credential. A slug that is
        not one of your agency's current clients is `404 not_found`. An agency key is limited to
        600 requests a minute per key on EACH API server (the cap is per replica), plus its own
        budget per client (`limit_scope: agency_client`), separate from the client's own keys.
      </ApiParam>
    </ApiParams>

    <ApiParams title="Responses">
      <ApiParam name="204">
        Revoked. Its link no longer works.
      </ApiParam>

      <ApiParam name="Other">
        An RFC 9457 problem.
      </ApiParam>
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    <Tabs items="['cURL', 'JavaScript', 'Python']">
      <Tab value="cURL">
        ```bash
        curl -X DELETE https://api-hq.aiworkforceone.com/v1/invites/inv_osw5IZUY55lbPHG4sHWkxl \
          -H "Authorization: Bearer $HQ_API_KEY" \
          -H "HQ-Version: 2026-11-01" \
          -H "Idempotency-Key: $(uuidgen)"
        ```
      </Tab>

      <Tab value="JavaScript">
        ```js
        const res = await fetch('https://api-hq.aiworkforceone.com/v1/invites/inv_osw5IZUY55lbPHG4sHWkxl', {
          method: 'DELETE',
          headers: {
            Authorization: `Bearer ${process.env['HQ_API_KEY']}`,
            'HQ-Version': '2026-11-01',
            'Idempotency-Key': crypto.randomUUID(),
          },
        });
        console.log(res.status);
        ```
      </Tab>

      <Tab value="Python">
        ```python
        import os
        import uuid

        import requests

        res = requests.delete(
            "https://api-hq.aiworkforceone.com/v1/invites/inv_osw5IZUY55lbPHG4sHWkxl",
            headers={
                "Authorization": f"Bearer {os.environ['HQ_API_KEY']}",
                "HQ-Version": "2026-11-01",
                "Idempotency-Key": str(uuid.uuid4()),
            },
        )
        print(res.status_code)
        ```
      </Tab>
    </Tabs>

    <ApiResponseNote status="204">
      Revoked. Its link no longer works.
    </ApiResponseNote>
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ## Resend an invitation [#resend-an-invitation]

    <ApiEndpointHeader method="POST" path="/v1/invites/{invite_id}/resend" scope="members:invite" />

    Sends a new link (the old one stops working) and extends the expiry.

    <ApiParams title="Path parameters">
      <ApiParam name="invite_id" type="string" required="true">
        An invitation id.
      </ApiParam>
    </ApiParams>

    <ApiParams title="Headers">
      <ApiParam name="Idempotency-Key" type="string">
        Makes a retry safe: the same key and body within 24 hours returns the first response again
        (`Idempotent-Replayed: true`); the same key with another body is 422.
      </ApiParam>

      <ApiParam name="HQ-Version" type="string (date)">
        A dated API version. Defaults to the version the key was created with.
      </ApiParam>

      <ApiParam name="HQ-Account" type="string">
        Agency keys only: the slug of the client organization this request acts for. Required with
        an agency key, refused with `400 invalid_request` on any other credential. A slug that is
        not one of your agency's current clients is `404 not_found`. An agency key is limited to
        600 requests a minute per key on EACH API server (the cap is per replica), plus its own
        budget per client (`limit_scope: agency_client`), separate from the client's own keys.
      </ApiParam>
    </ApiParams>

    **Returns** a [Invite](#invite) object.

    <ApiParams title="Responses">
      <ApiParam name="200">
        The invitation.
      </ApiParam>

      <ApiParam name="Other">
        An RFC 9457 problem.
      </ApiParam>
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    <Tabs items="['cURL', 'JavaScript', 'Python']">
      <Tab value="cURL">
        ```bash
        curl -X POST https://api-hq.aiworkforceone.com/v1/invites/inv_osw5IZUY55lbPHG4sHWkxl/resend \
          -H "Authorization: Bearer $HQ_API_KEY" \
          -H "HQ-Version: 2026-11-01" \
          -H "Idempotency-Key: $(uuidgen)"
        ```
      </Tab>

      <Tab value="JavaScript">
        ```js
        const res = await fetch('https://api-hq.aiworkforceone.com/v1/invites/inv_osw5IZUY55lbPHG4sHWkxl/resend', {
          method: 'POST',
          headers: {
            Authorization: `Bearer ${process.env['HQ_API_KEY']}`,
            'HQ-Version': '2026-11-01',
            'Idempotency-Key': crypto.randomUUID(),
          },
        });
        console.log(await res.json());
        ```
      </Tab>

      <Tab value="Python">
        ```python
        import os
        import uuid

        import requests

        res = requests.post(
            "https://api-hq.aiworkforceone.com/v1/invites/inv_osw5IZUY55lbPHG4sHWkxl/resend",
            headers={
                "Authorization": f"Bearer {os.environ['HQ_API_KEY']}",
                "HQ-Version": "2026-11-01",
                "Idempotency-Key": str(uuid.uuid4()),
            },
        )
        print(res.json())
        ```
      </Tab>
    </Tabs>

    ```json title="Response 200"
    {
      "object": "invite",
      "id": "inv_osw5IZUY55lbPHG4sHWkxl",
      "email": "priya.patel@example.com",
      "role": "member",
      "title": "Data analyst",
      "invited_by": {
        "id": "user_yFfQdB3rxA41x3cTD5fx2Q",
        "name": "Maya Chen"
      },
      "created_at": "2026-10-13T10:00:00.000Z",
      "expires_at": "2026-10-20T10:00:00.000Z"
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

## Objects [#objects]

<ApiEndpoint>
  <ApiEndpointMain>
    ### Org [#org]

    <ApiParams title="Attributes">
      <ApiParam name="object" type="string" />

      <ApiParam name="id" type="string" />

      <ApiParam name="name" type="string" />

      <ApiParam name="slug" type="string" />

      <ApiParam name="plan" type="string" />

      <ApiParam name="plan_status" type="string" />

      <ApiParam name="trial_ends_at" type="string or null" />

      <ApiParam name="current_period_end" type="string or null" />

      <ApiParam name="cancel_at_period_end" type="boolean" />

      <ApiParam name="created_at" type="string (date-time)" />
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    ```json title="The Org object"
    {
      "object": "org",
      "id": "org_3SvwLF4ulih8bHz5KtmNOO",
      "name": "Acme Robotics",
      "slug": "acme",
      "plan": "growth",
      "plan_status": "active",
      "trial_ends_at": null,
      "current_period_end": "2026-11-28T00:00:00.000Z",
      "cancel_at_period_end": false,
      "created_at": "2026-03-04T11:20:00.000Z"
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ### OrgChart [#orgchart]

    <ApiParams title="Attributes">
      <ApiParam name="object" type="string" />

      <ApiParam name="owners" type="array of object" />

      <ApiParam name="people" type="array of object" />

      <ApiParam name="pending_invites" type="array of object" />

      <ApiParam name="teams" type="array of object" />
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    ```json title="The OrgChart object"
    {
      "object": "org_chart",
      "owners": [
        {
          "id": "user_yFfQdB3rxA41x3cTD5fx2Q",
          "name": "Maya Chen",
          "email": "maya.chen@example.com",
          "title": "CTO"
        }
      ],
      "people": [
        {
          "id": "user_82yssFqK4JG6pUfKfe95V3",
          "name": "Sam Okafor",
          "email": "sam.okafor@example.com",
          "title": "Platform lead",
          "role": "admin"
        }
      ],
      "pending_invites": [
        {
          "id": "inv_osw5IZUY55lbPHG4sHWkxl",
          "email": "priya.patel@example.com",
          "role": "member",
          "title": "Data analyst"
        }
      ],
      "teams": [
        {
          "team": "team_3kQ9vX2mR8tLpZ4wYc1aBd",
          "name": "Research",
          "engine": "claude",
          "reports_to": [
            {
              "user": "user_82yssFqK4JG6pUfKfe95V3",
              "role": "owner"
            }
          ],
          "ai_employee_count": 3,
          "skill_count": 12,
          "running_sessions": 2,
          "schedule_count": 4,
          "next_run_at": "2026-10-19T07:00:00.000Z"
        }
      ]
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ### Member [#member]

    <ApiParams title="Attributes">
      <ApiParam name="object" type="string" />

      <ApiParam name="id" type="string" />

      <ApiParam name="name" type="string" />

      <ApiParam name="email" type="string" />

      <ApiParam name="role" type="string">
        One of `owner`, `admin`, `member`.
      </ApiParam>

      <ApiParam name="title" type="string or null" />

      <ApiParam name="two_factor_enabled" type="boolean" />

      <ApiParam name="joined_at" type="string (date-time)" />

      <ApiParam name="last_login_at" type="string or null" />
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    ```json title="The Member object"
    {
      "object": "member",
      "id": "user_82yssFqK4JG6pUfKfe95V3",
      "name": "Sam Okafor",
      "email": "sam.okafor@example.com",
      "role": "admin",
      "title": "Platform lead",
      "two_factor_enabled": true,
      "joined_at": "2026-03-09T15:41:02.000Z",
      "last_login_at": "2026-10-14T08:03:57.000Z"
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>

<ApiEndpoint>
  <ApiEndpointMain>
    ### Invite [#invite]

    <ApiParams title="Attributes">
      <ApiParam name="object" type="string" />

      <ApiParam name="id" type="string" />

      <ApiParam name="email" type="string" />

      <ApiParam name="role" type="string" />

      <ApiParam name="title" type="string or null" />

      <ApiParam name="invited_by" type="UserRef" />

      <ApiParam name="created_at" type="string (date-time)" />

      <ApiParam name="expires_at" type="string (date-time)" />
    </ApiParams>
  </ApiEndpointMain>

  <ApiEndpointSamples>
    ```json title="The Invite object"
    {
      "object": "invite",
      "id": "inv_osw5IZUY55lbPHG4sHWkxl",
      "email": "priya.patel@example.com",
      "role": "member",
      "title": "Data analyst",
      "invited_by": {
        "id": "user_yFfQdB3rxA41x3cTD5fx2Q",
        "name": "Maya Chen"
      },
      "created_at": "2026-10-13T10:00:00.000Z",
      "expires_at": "2026-10-20T10:00:00.000Z"
    }
    ```
  </ApiEndpointSamples>
</ApiEndpoint>
