Skip to content

respond_to_model_share

Respond to a model share request: action=‘accept’ or ‘reject’ a pending request, or action=‘revoke’ an accepted share. action=‘accept’: caller must have Owner or Editor access to target_model_name in the acting workspace (your current one, or workspace_id if passed — must be the request’s target workspace) and the models:write capability.

destructive

Name Type Required Default Description
action one of: accept, reject, revoke Yes — ‘accept’ a pending request (writes the model into the target workspace), ‘reject’ a pending request, or ‘revoke’ an accepted share.
request_id string Yes — UUID of the model share request.
target_model_name string No '' action=‘accept’ only, and required there: name of the local model to import the shared model file into.
target_script_name string No '' action=‘accept’ only: name for the imported model file in the target model. Defaults to the request’s suggested name.
expected_sha string No '' action=‘accept’ only: current content revision of the target file. Required when the target path already exists — omitting it returns a conflict error with the current revision and a recovery hint.
workspace_id string No None Optional UUID of a workspace other than your current one to act from. For action=‘accept’ or ‘reject’, must be the request’s target workspace. For action=‘revoke’, whichever of your workspaces is the request’s source or target. Omit to use your current workspace. Cross-workspace targeting requires an active membership in that workspace and is only available to OAuth/JWT sessions — API tokens stay scoped to their issuing workspace. The response echoes workspace_id so you can reuse it on follow-up calls.

Returns a structured object. Top-level fields:

  • request_id (string)
  • status (string)
  • updated_at (string)
  • workspace_id (string)
  • target_model (string)
  • target_script (string)
  • target_path (string)
  • source_commit_sha (string)
  • target_commit_sha (string)
  • accepted_at (string)
  • target_workspace_id (string)

See the response example below for the full payload shape.

{
"name": "respond_to_model_share",
"arguments": {
"action": "accept",
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"target_model_name": "forecasts",
"target_script_name": "acme_revenue_forecast"
}
}
{
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"status": "accepted",
"updated_at": "2026-04-28T10:00:00+00:00",
"workspace_id": "22222222-2222-2222-2222-222222222222",
"target_model": "forecasts",
"target_script": "acme_revenue_forecast",
"target_path": "model/acme_revenue_forecast.py",
"source_commit_sha": "abc1234def5678901234567890abcdef12345678",
"target_commit_sha": "0123456789abcdef0123456789abcdef01234567",
"accepted_at": "2026-04-28T10:00:00+00:00",
"target_workspace_id": "22222222-2222-2222-2222-222222222222"
}
  • Module: Sharing
  • Requires an authenticated Bridge Town session (OAuth) or an API token.