Skip to main content

Collaborators

Page Outline

Manages collaborator access for a model, supporting listing, adding, updating roles, and removing collaborators.

Base Path: /api/v1/models

Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)


List Collaborators

Returns all users who have explicit access to the model.

Method: GET

Path: /{model_id}/collaborators

Path Parameters

ParameterTypeDescription
model_idstringUnique identifier of the model

Response

{
"model_id": "mdl-7f3a19bc",
"collaborators": [
{ "user_id": "user-001", "email": "alice@example.com", "role": "owner" },
{ "user_id": "user-002", "email": "bob@example.com", "role": "editor" },
{ "user_id": "user-003", "email": "carol@example.com", "role": "viewer" }
]
}

Add Collaborator

Grants a user access to the model with the specified role.

Method: POST

Path: /{model_id}/collaborators

Request Body

{
"user_email": "dave@example.com",
"role": "editor"
}
FieldTypeRequiredDescription
user_emailstringEmail address of the user to add
rolestring"viewer", "editor", or "admin"

Behavior

  • The invitee must be a member of the same organization; cross-org invites are rejected with HTTP 403.
  • An audit log entry is written with action model.collaborator_added.

Response

Returns the updated collaborator record.


Remove Collaborator

Removes a user's access to the model.

Method: DELETE

Path: /{model_id}/collaborators/{user_id}

Behavior

  • The model owner cannot be removed. Returns HTTP 422 if attempting to remove the owner.
  • An audit log entry is written with action model.collaborator_removed.
  • Returns HTTP 204 No Content on success.