For the complete documentation index, see llms.txt. This page is also available as Markdown.

Assign users to sites

This endpoint assigns one or more users to one or more sites. Every listed site is applied to every listed user (a cartesian assignment). It supports single or bulk input using the same body shape.

Endpoint Description:

  • Endpoint: POST /api/sites/assign/

  • Base URL: https://api.vomevolunteer.com

API specification:

  • user_ids (array): List of Vome IDs.

  • site_ids (array): List of site ids.

  • user_id (string): Single Vome ID; normalized into user_ids.

  • site_id (string): Single site id; normalized into site_ids.

Authorization:

Requests to this endpoint must include an API-KEY in the header for authentication.

headers = {
    "API-KEY": "your_unique_api_key_here"
}
response = requests.post("https://api.vomevolunteer.com/api/sites/assign/", headers=headers)

Example Request Payload:

{
    "user_ids": ["<VOME_ID_1>", "<VOME_ID_2>"],
    "site_ids": ["<SITE_ID_A>", "<SITE_ID_B>"]
}

Response Structure:

Note: Assigning a site the user already has is a no-op; existing memberships are not removed. Any user_id that is not a profile in your organization is returned in skipped_user_ids; the rest still process. Unknown sites fail the whole call with a 400: { "site_ids": "Unknown site(s): <SITE_ID_X>" }.

Last updated