Skip to main content
POST
TypeScript

Autorisationer

Authorization
string
header
påkrævet

An Account API key. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

Scopes

authorized_user:create

Overskrifter

Idempotency-Key
string

A unique key that makes this request safe to retry. See Idempotent requests.

Maximum string length: 255
Eksempel:

"d9105228-4a08-46b1-8b91-42fed586d383"

Api-Version-Date
string

Pins the request to a dated API version.

Eksempel:

"2026-11-17"

Krop

application/json
account_id
string
påkrævet

Account ID, prefixed biz_.

Eksempel:

"biz_xxxxxxxxxxxxxx"

role
enum<string>
påkrævet

The system role to grant. Custom roles cannot be granted through the API. The Partner role provides view-only access.

Tilgængelige muligheder:
owner,
admin,
partner,
sales_manager,
moderator,
advertiser,
workforce
Eksempel:

"sales_manager"

email
string

Email address to invite. Mutually exclusive with user_id. If the email already belongs to a Whop account it is treated the same as passing that account's user_id; otherwise a pending invite is created for the email.

Eksempel:

"marcus@shinetime.example"

user_id
string

The user to add to the team, prefixed user_. Mutually exclusive with email.

Eksempel:

"user_xxxxxxxxxxxxxx"

Svar

Team member created.

account
object
påkrævet

The account this membership belongs to.

authorized_role
object | null
påkrævet

Custom role assigned to this member, or null when the member has a system role.

created_at
string
påkrævet

When the member joined the team or the invite was sent, as an ISO 8601 timestamp. A member who was a customer first keeps the date they were given their role.

Eksempel:

"2026-01-01T12:00:00.000Z"

direct_reports_count
integer | null
påkrævet

How many team members report directly to this member. null for invites.

Eksempel:

0

email
string | null
påkrævet

The member's email address. For an invite to an email with no Whop account yet, this is the invited address. Otherwise it is null unless the caller holds the company:authorized_user:email:read scope.

Eksempel:

"marcus@shinetime.example"

id
string
påkrævet

Team member ID. Accepted members have an ID starting with ausr_ or mber_, and pending invites one starting with ausri_. Treat it as opaque: both member prefixes are accepted wherever a team member ID is.

Eksempel:

"ausr_xxxxxxxxxxxxxx"

is_agent
boolean
påkrævet

Whether this member is an agent (app-controlled account) rather than a human team member. Always false for invites.

Eksempel:

false

is_partner
boolean
påkrævet

Whether this member or invite has the view-only Partner role, directly or through a custom role based on it. A Partner can read only the account's basic details.

Eksempel:

false

reports_to_chain
object[] | null
påkrævet
reports_to_id
string | null
påkrævet

The ID of the team member this member reports to, starting with ausr_ or mber_; treat it as opaque. null when the member reports to the business directly, and for invites.

Eksempel:

"ausr_xxxxxxxxxxxxxx"

role
enum<string>
påkrævet

The member's role on the account. custom means a bespoke dashboard-managed role; the API can read but not grant it.

Tilgængelige muligheder:
owner,
admin,
partner,
sales_manager,
moderator,
advertiser,
app_manager,
support,
manager,
workforce,
custom
Eksempel:

"admin"

status
enum<string>
påkrævet

joined for accepted members, pending while the invite is pending.

Tilgængelige muligheder:
joined,
pending
Eksempel:

"joined"

updated_at
string
påkrævet

When the membership was last updated, as an ISO 8601 timestamp.

Eksempel:

"2026-01-01T12:00:00.000Z"

user
object | null
påkrævet

The user behind this team membership. null for an invite sent to an email with no Whop account yet.