AI Workforce OneHQDocs

Organization

Your organization, its people and its pending invitations.

Get your organization

GET/v1/org
Permission org:read
Headers
HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

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.

Returns a Org object.

Responses
200

The organization.

Other

An RFC 9457 problem.

Get the org chart

GET/v1/org/chart
Permission 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.

Headers
HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

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.

Returns a OrgChart object.

Responses
200

The org chart.

Other

An RFC 9457 problem.

List members

GET/v1/members
Permission members:read
Query parameters
limitinteger

How many objects to return, 1 to 100. Default 20.

starting_afterstring

Return objects older than this id (the next page).

ending_beforestring

Return objects newer than this id (the previous page).

rolestring

Only members with this role. One of owner, admin, member.

Headers
HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

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.

Returns a list of Member objects.

Responses
200

A page of members.

Other

An RFC 9457 problem.

Get a member

GET/v1/members/{user_id}
Permission members:read
Path parameters
user_idstringrequired

A member's user id.

Headers
HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

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.

Returns a Member object.

Responses
200

The member.

Other

An RFC 9457 problem.

List pending invitations

GET/v1/invites
Permission members:read
Query parameters
limitinteger

How many objects to return, 1 to 100. Default 20.

starting_afterstring

Return objects older than this id (the next page).

ending_beforestring

Return objects newer than this id (the previous page).

Headers
HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

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.

Returns a list of Invite objects.

Responses
200

A page of invitations.

Other

An RFC 9457 problem.

Invite someone

POST/v1/invites
Permission 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).

Headers
Idempotency-Keystring

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.

HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

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.

Body parameters
emailstring (email)required
rolestring

One of member, admin.

titlestring or null

Returns a Invite object.

Responses
201

The invitation.

Other

An RFC 9457 problem.

Revoke an invitation

DELETE/v1/invites/{invite_id}
Permission members:invite
Path parameters
invite_idstringrequired

An invitation id.

Headers
Idempotency-Keystring

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.

HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

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.

Responses
204

Revoked. Its link no longer works.

Other

An RFC 9457 problem.

Resend an invitation

POST/v1/invites/{invite_id}/resend
Permission members:invite

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

Path parameters
invite_idstringrequired

An invitation id.

Headers
Idempotency-Keystring

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.

HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

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.

Returns a Invite object.

Responses
200

The invitation.

Other

An RFC 9457 problem.

Objects

Org

Attributes
objectstring
idstring
namestring
slugstring
planstring
plan_statusstring
trial_ends_atstring or null
current_period_endstring or null
cancel_at_period_endboolean
created_atstring (date-time)

OrgChart

Attributes
objectstring
ownersarray of object
peoplearray of object
pending_invitesarray of object
teamsarray of object

Member

Attributes
objectstring
idstring
namestring
emailstring
rolestring

One of owner, admin, member.

titlestring or null
two_factor_enabledboolean
joined_atstring (date-time)
last_login_atstring or null

Invite

Attributes
objectstring
idstring
emailstring
rolestring
titlestring or null
invited_byUserRef
created_atstring (date-time)
expires_atstring (date-time)