Skip to main content
POST
Share a site

Authorizations

Authorization
string
header
required

A member credential in the Authorization: Bearer header: a member session JWT, a portal JWT whose login is linked to a membership in that company, an opaque member token, or a verified One Auth identity access token. The credential alone identifies the member and company. Member session and portal JWTs are read-only and are refused with 403 on every write.

Path Parameters

site_id
string<uuid>
required

Public id of one of the member's sites.

Body

application/json

Share a site with one audience. Each audience kind takes its own targets, and sending a target the kind does not take is refused with 422.

audience_kind
enum<string>
required

Who to share with. A member share needs member_id and takes no other target. A downline share takes none. A segment share takes member_type_id, country_code, both or neither, and neither shares with every member the company's messaging policy lets you reach.

Available options:
member,
downline,
segment
member_id
string<uuid>

Id of the member to share with. A member of another company is refused with 422.

member_type_id
string<uuid>

Id of the member type of a segment.

country_code
string

ISO 3166-1 alpha-2 code of the country of a segment, one of the countries the company sells in.

Required string length: 2
permission
enum<string>
default:view

What the audience may do with the site. Ignored for an audience that is already shared; change it with PATCH.

Available options:
view,
copy

Response

The audience was already shared, so this is the share that exists, unchanged.

One share.

status
integer
required

HTTP status code (mirrors the response status line).

data
object
required

One audience a site is shared with. It never carries an email address.

meta
object
required

Envelope metadata present on every response.