Skip to content
This repository was archived by the owner on Nov 6, 2026. It is now read-only.

Latest commit

 

History

History
899 lines (577 loc) · 87 KB

api.md

File metadata and controls

899 lines (577 loc) · 87 KB

API Reference

Caution

box-python-sdk-gen is deprecated and no longer maintained. As of September 17, 2025, it receives no new features, bug fixes, or security patches. Do not use it for new projects.

Use box-python-sdk v10+ instead: pip install "boxsdk>=10". box-python-sdk v10 includes every manager listed below, plus newer ones. To migrate existing code, see the migration guide.

This file lists every manager and method exposed on BoxClient. For setup, authentication, and usage examples, see README.md. Each section links to a page in docs/ with code samples. Parameters marked ? are optional.

Client

See docs/client.md and docs/configuration.md.

Methods:

Authorization

Examples: docs/authorization.md

Methods:

  • client.authorization.authorize_user(response_type, client_id, redirect_uri?, state?, scope?, extra_headers?) -> None
  • client.authorization.request_access_token(grant_type, client_id?, client_secret?, code?, refresh_token?, assertion?, subject_token?, subject_token_type?, actor_token?, actor_token_type?, scope?, resource?, box_subject_type?, box_subject_id?, box_shared_link?, extra_headers?) -> AccessToken
  • client.authorization.refresh_access_token(client_id, client_secret, refresh_token, grant_type?, extra_headers?) -> AccessToken
  • client.authorization.revoke_access_token(client_id?, client_secret?, token?, extra_headers?) -> None

Files

Examples: docs/files.md

Methods:

  • client.files.get_file_by_id(file_id, fields?, if_none_match?, boxapi?, x_rep_hints?, extra_headers?) -> FileFull
  • client.files.update_file_by_id(file_id, name?, description?, parent?, shared_link?, lock?, disposition_at?, permissions?, collections?, tags?, fields?, if_match?, extra_headers?) -> FileFull
  • client.files.delete_file_by_id(file_id, if_match?, extra_headers?) -> None
  • client.files.copy_file(file_id, parent, name?, version?, fields?, extra_headers?) -> FileFull
  • client.files.get_file_thumbnail_url(file_id, extension, min_height?, min_width?, max_height?, max_width?, extra_headers?) -> str
  • client.files.get_file_thumbnail_by_id(file_id, extension, min_height?, min_width?, max_height?, max_width?, extra_headers?) -> Optional[ByteStream]

Trashed files

Examples: docs/trashed_files.md

Methods:

App item associations

Examples: docs/app_item_associations.md

Methods:

Downloads

Examples: docs/downloads.md

Methods:

  • client.downloads.get_download_file_url(file_id, version?, access_token?, range?, boxapi?, extra_headers?) -> str
  • client.downloads.download_file(file_id, version?, access_token?, range?, boxapi?, extra_headers?) -> Optional[ByteStream]
  • client.downloads.download_file_to_output_stream(file_id, output_stream, version?, access_token?, range?, boxapi?, extra_headers?) -> None

Uploads

Examples: docs/uploads.md

Methods:

  • client.uploads.upload_file_version(file_id, attributes, file, file_file_name?, file_content_type?, fields?, if_match?, content_md_5?, extra_headers?) -> Files
  • client.uploads.preflight_file_upload_check(name?, size?, parent?, extra_headers?) -> UploadUrl
  • client.uploads.upload_file(attributes, file, file_file_name?, file_content_type?, fields?, content_md_5?, extra_headers?) -> Files
  • client.uploads.upload_with_preflight_check(attributes, file, file_file_name?, file_content_type?, fields?, content_md_5?, extra_headers?) -> Files

Chunked uploads

Examples: docs/chunked_uploads.md

Methods:

List collaborations

Examples: docs/list_collaborations.md

Methods:

  • client.list_collaborations.get_file_collaborations(file_id, fields?, limit?, marker?, extra_headers?) -> Collaborations
  • client.list_collaborations.get_folder_collaborations(folder_id, fields?, limit?, marker?, extra_headers?) -> Collaborations
  • client.list_collaborations.get_collaborations(status, fields?, offset?, limit?, extra_headers?) -> CollaborationsOffsetPaginated
  • client.list_collaborations.get_group_collaborations(group_id, limit?, offset?, extra_headers?) -> CollaborationsOffsetPaginated

Comments

Examples: docs/comments.md

Methods:

  • client.comments.get_file_comments(file_id, fields?, limit?, offset?, extra_headers?) -> Comments
  • client.comments.get_comment_by_id(comment_id, fields?, extra_headers?) -> CommentFull
  • client.comments.update_comment_by_id(comment_id, message?, fields?, extra_headers?) -> CommentFull
  • client.comments.delete_comment_by_id(comment_id, extra_headers?) -> None
  • client.comments.create_comment(message, item, tagged_message?, fields?, extra_headers?) -> CommentFull

Tasks

Examples: docs/tasks.md

Methods:

  • client.tasks.get_file_tasks(file_id, extra_headers?) -> Tasks
  • client.tasks.create_task(item, action?, message?, due_at?, completion_rule?, extra_headers?) -> Task
  • client.tasks.get_task_by_id(task_id, extra_headers?) -> Task
  • client.tasks.update_task_by_id(task_id, action?, message?, due_at?, completion_rule?, extra_headers?) -> Task
  • client.tasks.delete_task_by_id(task_id, extra_headers?) -> None

File versions

Examples: docs/file_versions.md

Methods:

  • client.file_versions.get_file_versions(file_id, fields?, limit?, offset?, extra_headers?) -> FileVersions
  • client.file_versions.get_file_version_by_id(file_id, file_version_id, fields?, extra_headers?) -> FileVersionFull
  • client.file_versions.delete_file_version_by_id(file_id, file_version_id, if_match?, extra_headers?) -> None
  • client.file_versions.update_file_version_by_id(file_id, file_version_id, trashed_at?, extra_headers?) -> FileVersionFull
  • client.file_versions.promote_file_version(file_id, id?, type?, fields?, extra_headers?) -> FileVersionFull

File metadata

Examples: docs/file_metadata.md

Methods:

File classifications

Examples: docs/file_classifications.md

Methods:

Skills

Examples: docs/skills.md

Methods:

File watermarks

Examples: docs/file_watermarks.md

Methods:

File requests

Examples: docs/file_requests.md

Methods:

  • client.file_requests.get_file_request_by_id(file_request_id, extra_headers?) -> FileRequest
  • client.file_requests.update_file_request_by_id(file_request_id, title?, description?, status?, is_email_required?, is_description_required?, expires_at?, if_match?, extra_headers?) -> FileRequest
  • client.file_requests.delete_file_request_by_id(file_request_id, extra_headers?) -> None
  • client.file_requests.create_file_request_copy(file_request_id, folder, title?, description?, status?, is_email_required?, is_description_required?, expires_at?, extra_headers?) -> FileRequest

Folders

Examples: docs/folders.md

Methods:

  • client.folders.get_folder_by_id(folder_id, fields?, sort?, direction?, offset?, limit?, if_none_match?, boxapi?, extra_headers?) -> FolderFull
  • client.folders.update_folder_by_id(folder_id, name?, description?, sync_state?, can_non_owners_invite?, parent?, shared_link?, folder_upload_email?, tags?, is_collaboration_restricted_to_enterprise?, collections?, can_non_owners_view_collaborators?, fields?, if_match?, extra_headers?) -> FolderFull
  • client.folders.delete_folder_by_id(folder_id, recursive?, if_match?, extra_headers?) -> None
  • client.folders.get_folder_items(folder_id, fields?, usemarker?, marker?, offset?, limit?, sort?, direction?, boxapi?, extra_headers?) -> Items
  • client.folders.create_folder(name, parent, folder_upload_email?, sync_state?, fields?, extra_headers?) -> FolderFull
  • client.folders.copy_folder(folder_id, parent, name?, fields?, extra_headers?) -> FolderFull

Trashed folders

Examples: docs/trashed_folders.md

Methods:

Folder metadata

Examples: docs/folder_metadata.md

Methods:

Folder classifications

Examples: docs/folder_classifications.md

Methods:

Trashed items

Examples: docs/trashed_items.md

Methods:

  • client.trashed_items.get_trashed_items(fields?, limit?, offset?, usemarker?, marker?, direction?, sort?, extra_headers?) -> Items

Folder watermarks

Examples: docs/folder_watermarks.md

Methods:

Folder locks

Examples: docs/folder_locks.md

Methods:

Metadata templates

Examples: docs/metadata_templates.md

Methods:

Classifications

Examples: docs/classifications.md

Methods:

Metadata cascade policies

Examples: docs/metadata_cascade_policies.md

Methods:

Search

Examples: docs/search.md

Methods:

  • client.search.search_by_metadata_query(from_, ancestor_folder_id, query?, query_params?, order_by?, limit?, marker?, fields?, extra_headers?) -> MetadataQueryResults
  • client.search.search_for_content(query?, scope?, file_extensions?, created_at_range?, updated_at_range?, size_range?, owner_user_ids?, recent_updater_user_ids?, ancestor_folder_ids?, content_types?, type?, trash_content?, mdfilters?, sort?, direction?, limit?, include_recent_shared_links?, fields?, offset?, deleted_user_ids?, deleted_at_range?, extra_headers?) -> Union[SearchResults, SearchResultsWithSharedLinks]

User collaborations

Examples: docs/user_collaborations.md

Methods:

  • client.user_collaborations.get_collaboration_by_id(collaboration_id, fields?, extra_headers?) -> Collaboration
  • client.user_collaborations.update_collaboration_by_id(collaboration_id, role, status?, expires_at?, can_view_path?, extra_headers?) -> Optional[Collaboration]
  • client.user_collaborations.delete_collaboration_by_id(collaboration_id, extra_headers?) -> None
  • client.user_collaborations.create_collaboration(item, accessible_by, role, is_access_only?, can_view_path?, expires_at?, fields?, notify?, extra_headers?) -> Collaboration

Task assignments

Examples: docs/task_assignments.md

Methods:

Shared links files

Examples: docs/shared_links_files.md

Methods:

Shared links folders

Examples: docs/shared_links_folders.md

Methods:

Web links

Examples: docs/web_links.md

Methods:

  • client.web_links.create_web_link(url, parent, name?, description?, extra_headers?) -> WebLink
  • client.web_links.get_web_link_by_id(web_link_id, boxapi?, extra_headers?) -> WebLink
  • client.web_links.update_web_link_by_id(web_link_id, url?, parent?, name?, description?, shared_link?, extra_headers?) -> WebLink
  • client.web_links.delete_web_link_by_id(web_link_id, extra_headers?) -> None

Trashed web links

Examples: docs/trashed_web_links.md

Methods:

Shared links web links

Examples: docs/shared_links_web_links.md

Methods:

Shared links app items

Examples: docs/shared_links_app_items.md

Methods:

Users

Examples: docs/users.md

Methods:

  • client.users.get_users(filter_term?, user_type?, external_app_user_id?, fields?, offset?, limit?, usemarker?, marker?, extra_headers?) -> Users
  • client.users.create_user(name, login?, is_platform_access_only?, role?, language?, is_sync_enabled?, job_title?, phone?, address?, space_amount?, tracking_codes?, can_see_managed_users?, timezone?, is_external_collab_restricted?, is_exempt_from_device_limits?, is_exempt_from_login_verification?, status?, external_app_user_id?, fields?, extra_headers?) -> UserFull
  • client.users.get_user_me(fields?, extra_headers?) -> UserFull
  • client.users.get_user_by_id(user_id, fields?, extra_headers?) -> UserFull
  • client.users.update_user_by_id(user_id, enterprise?, notify?, name?, login?, role?, language?, is_sync_enabled?, job_title?, phone?, address?, tracking_codes?, can_see_managed_users?, timezone?, is_external_collab_restricted?, is_exempt_from_device_limits?, is_exempt_from_login_verification?, is_password_reset_required?, status?, space_amount?, notification_email?, external_app_user_id?, fields?, extra_headers?) -> UserFull
  • client.users.delete_user_by_id(user_id, notify?, force?, extra_headers?) -> None

Session termination

Examples: docs/session_termination.md

Methods:

Avatars

Examples: docs/avatars.md

Methods:

Transfer

Examples: docs/transfer.md

Methods:

  • client.transfer.transfer_owned_folder(user_id, owned_by, fields?, notify?, extra_headers?) -> FolderFull

Email aliases

Examples: docs/email_aliases.md

Methods:

Memberships

Examples: docs/memberships.md

Methods:

Invites

Examples: docs/invites.md

Methods:

  • client.invites.create_invite(enterprise, actionable_by, fields?, extra_headers?) -> Invite
  • client.invites.get_invite_by_id(invite_id, fields?, extra_headers?) -> Invite

Groups

Examples: docs/groups.md

Methods:

  • client.groups.get_groups(filter_term?, fields?, limit?, offset?, extra_headers?) -> Groups
  • client.groups.create_group(name, provenance?, external_sync_identifier?, description?, invitability_level?, member_viewability_level?, fields?, extra_headers?) -> GroupFull
  • client.groups.get_group_by_id(group_id, fields?, extra_headers?) -> GroupFull
  • client.groups.update_group_by_id(group_id, name?, provenance?, external_sync_identifier?, description?, invitability_level?, member_viewability_level?, fields?, extra_headers?) -> GroupFull
  • client.groups.delete_group_by_id(group_id, extra_headers?) -> None

Webhooks

Examples: docs/webhooks.md

Methods:

  • client.webhooks.get_webhooks(marker?, limit?, extra_headers?) -> Webhooks
  • client.webhooks.create_webhook(target, address, triggers, extra_headers?) -> Webhook
  • client.webhooks.get_webhook_by_id(webhook_id, extra_headers?) -> Webhook
  • client.webhooks.update_webhook_by_id(webhook_id, target?, address?, triggers?, extra_headers?) -> Webhook
  • client.webhooks.delete_webhook_by_id(webhook_id, extra_headers?) -> None
  • client.webhooks.validate_message(body, headers, primary_key, secondary_key?, max_age?) -> bool

Events

Examples: docs/events.md

Methods:

  • client.events.get_events_with_long_polling(extra_headers?) -> RealtimeServers
  • client.events.get_events(stream_type?, stream_position?, limit?, event_type?, created_after?, created_before?, extra_headers?) -> Events
  • client.events.get_event_stream(query_params?, headers?) -> EventStream

Collections

Examples: docs/collections.md

Methods:

  • client.collections.get_collections(fields?, offset?, limit?, extra_headers?) -> Collections
  • client.collections.get_collection_items(collection_id, fields?, offset?, limit?, extra_headers?) -> ItemsOffsetPaginated
  • client.collections.get_collection_by_id(collection_id, extra_headers?) -> Collection

Recent items

Examples: docs/recent_items.md

Methods:

  • client.recent_items.get_recent_items(fields?, limit?, marker?, extra_headers?) -> RecentItems

Retention policies

Examples: docs/retention_policies.md

Methods:

  • client.retention_policies.get_retention_policies(policy_name?, policy_type?, created_by_user_id?, fields?, limit?, marker?, extra_headers?) -> RetentionPolicies
  • client.retention_policies.create_retention_policy(policy_name, policy_type, disposition_action, description?, retention_length?, retention_type?, can_owner_extend_retention?, are_owners_notified?, custom_notification_recipients?, extra_headers?) -> RetentionPolicy
  • client.retention_policies.get_retention_policy_by_id(retention_policy_id, fields?, extra_headers?) -> RetentionPolicy
  • client.retention_policies.update_retention_policy_by_id(retention_policy_id, policy_name?, description?, disposition_action?, retention_type?, retention_length?, status?, can_owner_extend_retention?, are_owners_notified?, custom_notification_recipients?, extra_headers?) -> RetentionPolicy
  • client.retention_policies.delete_retention_policy_by_id(retention_policy_id, extra_headers?) -> None

Retention policy assignments

Examples: docs/retention_policy_assignments.md

Methods:

Legal hold policies

Examples: docs/legal_hold_policies.md

Methods:

Legal hold policy assignments

Examples: docs/legal_hold_policy_assignments.md

Methods:

File version retentions

Examples: docs/file_version_retentions.md

Methods:

  • client.file_version_retentions.get_file_version_retentions(file_id?, file_version_id?, policy_id?, disposition_action?, disposition_before?, disposition_after?, limit?, marker?, extra_headers?) -> FileVersionRetentions
  • client.file_version_retentions.get_file_version_retention_by_id(file_version_retention_id, extra_headers?) -> FileVersionRetention

File version legal holds

Examples: docs/file_version_legal_holds.md

Methods:

Shield information barriers

Examples: docs/shield_information_barriers.md

Methods:

Shield information barrier reports

Examples: docs/shield_information_barrier_reports.md

Methods:

Shield information barrier segments

Examples: docs/shield_information_barrier_segments.md

Methods:

Shield information barrier segment members

Examples: docs/shield_information_barrier_segment_members.md

Methods:

Shield information barrier segment restrictions

Examples: docs/shield_information_barrier_segment_restrictions.md

Methods:

Device pinners

Examples: docs/device_pinners.md

Methods:

Terms of services

Examples: docs/terms_of_services.md

Methods:

Terms of service user statuses

Examples: docs/terms_of_service_user_statuses.md

Methods:

Collaboration allowlist entries

Examples: docs/collaboration_allowlist_entries.md

Methods:

Collaboration allowlist exempt targets

Examples: docs/collaboration_allowlist_exempt_targets.md

Methods:

Storage policies

Examples: docs/storage_policies.md

Methods:

Storage policy assignments

Examples: docs/storage_policy_assignments.md

Methods:

Zip downloads

Examples: docs/zip_downloads.md

Methods:

Sign requests

Examples: docs/sign_requests.md

Methods:

  • client.sign_requests.cancel_sign_request(sign_request_id, extra_headers?) -> SignRequest
  • client.sign_requests.resend_sign_request(sign_request_id, extra_headers?) -> None
  • client.sign_requests.get_sign_request_by_id(sign_request_id, extra_headers?) -> SignRequest
  • client.sign_requests.get_sign_requests(marker?, limit?, senders?, shared_requests?, extra_headers?) -> SignRequests
  • client.sign_requests.create_sign_request(signers, source_files?, signature_color?, parent_folder?, is_document_preparation_needed?, redirect_url?, declined_redirect_url?, are_text_signatures_enabled?, email_subject?, email_message?, are_reminders_enabled?, name?, prefill_tags?, days_valid?, external_id?, template_id?, external_system_name?, extra_headers?) -> SignRequest

Workflows

Examples: docs/workflows.md

Methods:

  • client.workflows.get_workflows(folder_id, trigger_type?, limit?, marker?, extra_headers?) -> Workflows
  • client.workflows.start_workflow(workflow_id, flow, files, folder, type?, outcomes?, extra_headers?) -> None

Sign templates

Examples: docs/sign_templates.md

Methods:

Integration mappings

Examples: docs/integration_mappings.md

Methods:

Ai

Examples: docs/ai.md

Methods:

  • client.ai.create_ai_ask(mode, prompt, items, dialogue_history?, include_citations?, ai_agent?, extra_headers?) -> Optional[AiResponseFull]
  • client.ai.create_ai_text_gen(prompt, items, dialogue_history?, ai_agent?, extra_headers?) -> AiResponse
  • client.ai.get_ai_agent_default_config(mode, language?, model?, extra_headers?) -> Union[AiAgentAsk, AiAgentTextGen, AiAgentExtract, AiAgentExtractStructured]
  • client.ai.create_ai_extract(prompt, items, ai_agent?, extra_headers?) -> AiResponse
  • client.ai.create_ai_extract_structured(items, metadata_template?, fields?, ai_agent?, extra_headers?) -> AiExtractStructuredResponse

Ai studio

Examples: docs/ai_studio.md

Methods:

  • client.ai_studio.get_ai_agents(mode?, fields?, agent_state?, include_box_default?, marker?, limit?, extra_headers?) -> AiMultipleAgentResponse
  • client.ai_studio.create_ai_agent(name, access_state, type?, icon_reference?, allowed_entities?, ask?, text_gen?, extract?, extra_headers?) -> AiSingleAgentResponseFull
  • client.ai_studio.update_ai_agent_by_id(agent_id, name, access_state, type?, icon_reference?, allowed_entities?, ask?, text_gen?, extract?, extra_headers?) -> AiSingleAgentResponseFull
  • client.ai_studio.get_ai_agent_by_id(agent_id, fields?, extra_headers?) -> AiSingleAgentResponseFull
  • client.ai_studio.delete_ai_agent_by_id(agent_id, extra_headers?) -> None

Docgen template

Examples: docs/docgen_template.md

Methods:

Docgen

Examples: docs/docgen.md

Methods:

Hubs

Examples: docs/hubs.md

Methods:

  • client.hubs.get_hubs_v2025_r0(query?, scope?, sort?, direction?, marker?, limit?, box_version?, extra_headers?) -> HubsV2025R0
  • client.hubs.create_hub_v2025_r0(title, description?, box_version?, extra_headers?) -> HubV2025R0
  • client.hubs.get_enterprise_hubs_v2025_r0(query?, sort?, direction?, marker?, limit?, box_version?, extra_headers?) -> HubsV2025R0
  • client.hubs.get_hub_by_id_v2025_r0(hub_id, box_version?, extra_headers?) -> HubV2025R0
  • client.hubs.update_hub_by_id_v2025_r0(hub_id, title?, description?, is_ai_enabled?, is_collaboration_restricted_to_enterprise?, can_non_owners_invite?, can_shared_link_be_created?, box_version?, extra_headers?) -> HubV2025R0
  • client.hubs.delete_hub_by_id_v2025_r0(hub_id, box_version?, extra_headers?) -> None
  • client.hubs.copy_hub_v2025_r0(hub_id, title?, description?, box_version?, extra_headers?) -> HubV2025R0

Hub collaborations

Examples: docs/hub_collaborations.md

Methods:

Hub items

Examples: docs/hub_items.md

Methods:

  • client.hub_items.get_hub_items_v2025_r0(hub_id, marker?, limit?, box_version?, extra_headers?) -> HubItemsV2025R0
  • client.hub_items.manage_hub_items_v2025_r0(hub_id, operations?, box_version?, extra_headers?) -> HubItemsManageResponseV2025R0

Shield lists

Examples: docs/shield_lists.md

Methods:

Archives

Examples: docs/archives.md

Methods: