Members

Bulk create up to 500 members

Creates multiple members in a single request. Accepts up to 500 members in the members array. If accessGroupIds is provided, all successfully created members are assigned to those groups.

Returns HTTP 207 Multi-Status with per-item results. Each item in the response has a status of 'created' (success with member data), 'conflict' (email already exists), or 'error' (other failure). The summary object shows totals: total attempted, created count, and failed count.

This endpoint does NOT fail atomically — some members may be created while others fail. Always check the per-item results.

POST /members/bulk

Bulk create up to 500 members

curl --request POST \
  --url 'https://api.sotion.so/api/v1/members/bulk' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "value"
}'
{
  "data": [
    {
      "email": "<email>",
      "status": "created",
      "member": {
        "id": "<uuid>",
        "email": "<email>",
        "displayName": "<string>",
        "status": "active",
        "verified": true,
        "paid": true,
        "registeredAt": "<date-time>",
        "lastLoginAt": "<date-time>",
        "createdAt": "<date-time>",
        "updatedAt": "<date-time>"
      },
      "error": {
        "code": "<string>",
        "message": "<string>"
      }
    }
  ],
  "summary": {
    "total": 1,
    "created": 1,
    "failed": 1
  }
}

Multi-status response with per-item results.

Authorizations

  • Authorization string required header

    Per-site API key (prefix: so_...). Each key is scoped to exactly one Sotion site — the site context is determined entirely by the key. No site ID is needed in any URL. Pass as: Authorization: Bearer so_...

Request Body

application/json
  • members[] object required array

    Array of member objects to create. Minimum 1, maximum 500.

    + Show Child Attributes
    • email string (email) required

      Email address for the new member. Will be normalized to lowercase.

    • displayName string nullable

      Optional display name.

    • paid boolean default

      Whether to mark as paid. Defaults to false. Default: false.

  • accessGroupIds[] string (uuid) array

    UUIDs of custom access groups to assign to ALL created members. Scope groups not allowed.

Response

application/json
  • X-RateLimit-Limit integer response header

    Maximum requests allowed in the current window.

  • X-RateLimit-Remaining integer response header

    Requests remaining in the current window.

  • X-RateLimit-Reset integer response header

    Unix timestamp (seconds) when the rate limit window resets.

  • X-Request-Id string (uuid) response header

    Unique request identifier for support and debugging.

  • data[] object array
    + Show Child Attributes
    • email string (email)

      The email address that was submitted.

    • status string enum enum

      'created' = member was successfully created. 'conflict' = a member with this email already exists. 'error' = creation failed for another reason. Allowed values: created, conflict, error.

    • member object

      The created member object. Only present when status is 'created'.

      + Show Child Attributes
      • id string (uuid)

        Unique identifier (UUID) for the member.

      • email string (email)

        Member's email address (normalized to lowercase).

      • displayName string nullable

        Display name shown to the member, null if not set.

      • status string enum enum

        'active' means the member can access the site. 'blocked' means the member is denied access. Allowed values: active, blocked.

      • verified boolean nullable

        Whether the member has verified their email by clicking a login link. Null if unknown.

      • paid boolean nullable

        Whether this member is marked as a paying customer. Set manually or via the API.

      • registeredAt string (date-time) nullable

        When the member first registered (clicked a login link or was added).

      • lastLoginAt string (date-time) nullable

        When the member last logged in via a login link.

      • createdAt string (date-time) nullable

        When the member record was created.

      • updatedAt string (date-time) nullable

        When the member record was last modified.

    • error object

      Error details. Only present when status is 'conflict' or 'error'.

      + Show Child Attributes
      • code string
      • message string
  • summary object
    + Show Child Attributes
    • total integer

      Total number of members submitted in the request.

    • created integer

      Number of members successfully created.

    • failed integer

      Number of members that failed (conflict or error).