### Start Workflow with Request Body (Swift) Source: https://developer.box.com/reference/post-workflows-id-start Initiate a workflow in Swift using the Box SDK. This example shows how to construct the necessary request body with workflow, file, and folder details, and call the start workflow method. ```swift try await adminClient.workflows.startWorkflow(workflowId: workflowToRun.id!, requestBody: StartWorkflowRequestBody(type: StartWorkflowRequestBodyTypeField.workflowParameters, flow: StartWorkflowRequestBodyFlowField(type: "flow", id: workflowToRun.flows![0].id!), files: [StartWorkflowRequestBodyFilesField(type: StartWorkflowRequestBodyFilesTypeField.file, id: workflowFileId)], folder: StartWorkflowRequestBodyFolderField(type: StartWorkflowRequestBodyFolderField.folder, id: workflowFolderId))) ``` -------------------------------- ### List all Box Hubs (Node.js) Source: https://developer.box.com/reference/v2025.0/get-hubs This Node.js example shows how to list all Box Hubs, including options for scope, sorting, and direction. Ensure you have the Box SDK for Node.js installed. ```node await client.hubs.getHubsV2025R0({ scope: 'all', sort: 'name', direction: 'ASC' as GetHubsV2025R0QueryParamsDirectionField, } satisfies GetHubsV2025R0QueryParams); ``` -------------------------------- ### Metadata Example Source: https://developer.box.com/reference/post-folders-id-copy This example shows the structure of metadata that can be associated with a folder or file, including enterprise-specific fields. ```json enterprise_27335: marketingCollateral: $canEdit: true $id: 01234500-12f1-1234-aa12-b1d234cb567e $parent: folder_59449484661 $scope: enterprise_27335 $template: marketingCollateral $type: properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0 $typeVersion: 2 $version: 1 ``` -------------------------------- ### Folder Metadata Example Source: https://developer.box.com/reference/get-folders-id This example shows how to request folder metadata, including custom metadata instances, using the `fields` query parameter. ```APIDOC ## GET /folders/:id ### Description Retrieves a folder, including its metadata. ### Method GET ### Endpoint `/folders/:id?fields=metadata..` ### Parameters #### Query Parameters - **fields** (string) - Required - Comma-separated list of fields to include in the response. Use `metadata..` to specify metadata. ### Response #### Success Response (200) - **metadata** (object) - Contains metadata instances for the folder, keyed by scope and templateKey. ### Response Example ```json { "metadata": { "enterprise_27335": { "marketingCollateral": { "$canEdit": true, "$id": "01234500-12f1-1234-aa12-b1d234cb567e", "$parent": "folder_59449484661", "$scope": "enterprise_27335", "$template": "marketingCollateral", "$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0", "$typeVersion": 2, "$version": 1 } } } } ``` ``` -------------------------------- ### File Metadata Example Source: https://developer.box.com/reference/get-folders-id This example shows how to request file metadata, including custom metadata instances, using the `fields` query parameter. ```APIDOC ## GET /files/:id ### Description Retrieves a file, including its metadata. ### Method GET ### Endpoint `/files/:id?fields=metadata..` ### Parameters #### Query Parameters - **fields** (string) - Required - Comma-separated list of fields to include in the response. Use `metadata..` to specify metadata. ### Response #### Success Response (200) - **metadata** (object) - Contains metadata instances for the file, keyed by scope and templateKey. ### Response Example ```json { "metadata": { "enterprise_27335": { "marketingCollateral": { "$canEdit": true, "$id": "01234500-12f1-1234-aa12-b1d234cb567e", "$parent": "folder_59449484661", "$scope": "enterprise_27335", "$template": "marketingCollateral", "$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0", "$typeVersion": 2, "$version": 1 } } } } ``` ``` -------------------------------- ### Get classification on folder - Node.js Source: https://developer.box.com/reference/get-folders-id-metadata-enterprise-securityClassification-6VMVochwUWo This Node.js example shows how to get the security classification applied to a folder. Make sure your client is authenticated and you have the folder ID. ```node await client.folderClassifications.getClassificationOnFolder(folder.id); ``` -------------------------------- ### List all webhooks using Box SDKs Source: https://developer.box.com/reference/get-webhooks Examples for retrieving webhooks using various Box SDKs. These snippets demonstrate the client method for fetching webhook configurations. ```dotnet await client.Webhooks.GetWebhooksAsync(); ``` ```swift try await client.webhooks.getWebhooks() ``` ```java client.getWebhooks().getWebhooks() ``` ```node await client.webhooks.getWebhooks(); ``` ```python client.webhooks.get_webhooks() ``` -------------------------------- ### Get Box Sign Template by ID Source: https://developer.box.com/reference/get-sign-templates-id Get a Box Sign template by its ID using the Java SDK. This example requires a client object and access to a list of sign templates. ```java client.getSignTemplates().getSignTemplateById(signTemplates.getEntries().get(0).getId()) ``` -------------------------------- ### List Terms of Services (Box SDKs) Source: https://developer.box.com/reference/get-terms-of-services Examples of how to list terms of service using various Box SDKs. ```dotnet await client.TermsOfServices.GetTermsOfServiceAsync(); ``` ```swift try await client.termsOfServices.getTermsOfService() ``` ```java client.getTermsOfServices().getTermsOfService() ``` ```node await client.termsOfServices.getTermsOfService(); ``` ```python client.terms_of_services.get_terms_of_service() ``` -------------------------------- ### Get Box Sign Request by ID (Java) Source: https://developer.box.com/reference/get-sign-requests-id Use the Java SDK to get a Box Sign request by its ID. This example requires a client instance and a created sign request object. ```java client.getSignRequests().getSignRequestById(createdSignRequest.getId()) ``` -------------------------------- ### Get Shared Link for Folder using Box SDKs Source: https://developer.box.com/reference/get-folders-id--get-shared-link Examples of how to get the shared link for a folder using the Box SDKs for various languages. Ensure you have initialized the Box client and have the folder ID available. ```dotnet await client.SharedLinksFolders.GetSharedLinkForFolderAsync(folderId: folder.Id, queryParams: new GetSharedLinkForFolderQueryParams(fields: "shared_link")); ``` ```swift try await client.sharedLinksFolders.getSharedLinkForFolder(folderId: folder.id, queryParams: GetSharedLinkForFolderQueryParams(fields: "shared_link")) ``` ```java client.getSharedLinksFolders().getSharedLinkForFolder(folder.getId(), new GetSharedLinkForFolderQueryParams("shared_link")) ``` ```node await client.sharedLinksFolders.getSharedLinkForFolder(folder.id, { fields: 'shared_link', } satisfies GetSharedLinkForFolderQueryParams); ``` ```python client.shared_links_folders.get_shared_link_for_folder(folder.id, "shared_link") ``` -------------------------------- ### Create Metadata Taxonomy with .NET SDK Source: https://developer.box.com/reference/post-metadata-taxonomies This .NET SDK example demonstrates how to create a metadata taxonomy. It requires the `client` object to be initialized with appropriate authentication. ```dotnet await client.MetadataTaxonomies.CreateMetadataTaxonomyAsync(requestBody: ``` -------------------------------- ### Create Zip Download using Python Source: https://developer.box.com/reference/post-zip-downloads This Python code snippet shows how to initiate a zip download. It uses the `client` object and requires a list of `CreateZipDownloadItems` and a download file name. ```python client.zip_downloads.create_zip_download( [ CreateZipDownloadItems(id=file_1.id, type=DownloadZipItemsTypeField.FILE), CreateZipDownloadItems(id=file_2.id, type=DownloadZipItemsTypeField.FILE), ``` -------------------------------- ### Create Metadata Instance on File (.NET) Source: https://developer.box.com/reference/post-files-id-metadata-id-id Use the .NET SDK to create a metadata instance on a file. This example demonstrates creating an instance with various data types. ```dotnet await client.FileMetadata.CreateFileMetadataByIdAsync(fileId: file.Id, scope: CreateFileMetadataByIdScope.Enterprise, templateKey: templateKey, requestBody: new Dictionary() { { "name", "John" }, { "age", 23 }, { "birthDate", "2001-01-03T02:20:50.520Z" }, { "countryCode", "US" }, { "sports", Array.AsReadOnly(new [] {"basketball","tennis"}) } }); ``` -------------------------------- ### Get File Version Retention by ID (Node.js) Source: https://developer.box.com/reference/get-file-version-retentions-id This Node.js example retrieves a file version retention by its ID. It assumes you have an authenticated client instance. ```node await client.fileVersionRetentions.getFileVersionRetentionById( fileVersionRetention.id!, ); ``` -------------------------------- ### List Upload Session Parts (Box SDKs) Source: https://developer.box.com/reference/get-files-upload-sessions-id-parts These examples demonstrate how to list uploaded parts for an upload session using various Box SDKs. Ensure you have initialized the Box client with your credentials. ```dotnet await client.ChunkedUploads.GetFileUploadSessionPartsAsync(uploadSessionId: uploadSessionId); ``` ```swift try await client.chunkedUploads.getFileUploadSessionParts(uploadSessionId: uploadSessionId) ``` ```java client.getChunkedUploads().getFileUploadSessionParts(uploadSessionId) ``` ```node await client.chunkedUploads.getFileUploadSessionParts(uploadSessionId); ``` ```python client.chunked_uploads.get_file_upload_session_parts(upload_session_id) ``` -------------------------------- ### Get Task by ID using Box SDKs Source: https://developer.box.com/reference/get-tasks-id Examples of how to retrieve a task by its ID using various Box SDKs. Ensure you have an authenticated client instance. ```dotnet await client.Tasks.GetTaskByIdAsync(taskId: NullableUtils.Unwrap(task.Id)); ``` ```swift try await client.tasks.getTaskById(taskId: task.id!) ``` ```java client.getTasks().getTaskById(task.getId()) ``` ```node await client.tasks.getTaskById(task.id!); ``` ```python client.tasks.get_task_by_id(task.id) ``` -------------------------------- ### Create Metadata Instance on File (Python) Source: https://developer.box.com/reference/post-files-id-metadata-id-id Use the Python SDK to create a metadata instance on a file. This example demonstrates creating an instance with various data types. ```python client.file_metadata.create_file_metadata_by_id( file.id, CreateFileMetadataByIdScope.ENTERPRISE, template_key, { "name": "John", "age": 23, "birthDate": "2001-01-03T02:20:50.520Z", "countryCode": "US", "sports": ["basketball", "tennis"], }, ) ``` -------------------------------- ### Get Trashed File with .NET SDK Source: https://developer.box.com/reference/get-files-id-trash This .NET SDK example demonstrates how to retrieve a trashed file by its ID. This method is part of the TrashedFiles class in the Box SDK. ```dotnet await client.TrashedFiles.GetTrashedFileByIdAsync(fileId: file.Id); ``` -------------------------------- ### Get Watermark on File (Box SDKs) Source: https://developer.box.com/reference/get-files-id-watermark Examples of how to retrieve a file's watermark using various Box SDKs. Ensure you have authenticated your client with the necessary permissions. ```dotnet await client.FileWatermarks.GetFileWatermarkAsync(fileId: file.Id); ``` ```swift try await client.fileWatermarks.getFileWatermark(fileId: file.id) ``` ```java client.getFileWatermarks().getFileWatermark(file.getId()) ``` ```node await client.fileWatermarks.getFileWatermark(file.id); ``` ```python client.file_watermarks.get_file_watermark(file.id) ``` -------------------------------- ### Create Folder using Python SDK Source: https://developer.box.com/reference/post-folders Example of how to create a new folder using the Box Python SDK. Requires the client object to be initialized. ```python client.folders.create_folder(new_folder_name, CreateFolderParent(id="0")) ``` -------------------------------- ### Get AI Agent by ID using Java SDK Source: https://developer.box.com/reference/get-ai-agents-id This Java code retrieves an AI agent by its ID. The example includes specifying fields to be returned in the response. ```java client.getAiStudio().getAiAgentById(createdAgent.getId(), new GetAiAgentByIdQueryParams.Builder().fields(Arrays.asList("ask")).build()); ``` -------------------------------- ### Create Folder using .NET SDK Source: https://developer.box.com/reference/post-folders This .NET code snippet demonstrates how to create a folder. You need to provide the folder name and the parent folder ID. ```dotnet await client.Folders.CreateFolderAsync(requestBody: new CreateFolderRequestBody(name: newFolderName, parent: new CreateFolderRequestBodyParentField(id: "0"))); ``` -------------------------------- ### Get Box Sign Template by ID Source: https://developer.box.com/reference/get-sign-templates-id Retrieve a Box Sign template by its ID using the .NET SDK. This example assumes you have a client instance and a list of sign templates. ```dotnet await client.SignTemplates.GetSignTemplateByIdAsync(templateId: NullableUtils.Unwrap(NullableUtils.Unwrap(signTemplates.Entries)[0].Id)); ``` -------------------------------- ### Create Metadata Instance on File (Swift) Source: https://developer.box.com/reference/post-files-id-metadata-id-id Use the Swift SDK to create a metadata instance on a file. This example shows creating an instance with a simple key-value pair. ```swift try await client.fileMetadata.createFileMetadataById(fileId: file.id, scope: CreateFileMetadataByIdScope.global, templateKey: "properties", requestBody: ["abc": "xyz"]) ``` -------------------------------- ### Get Box Doc Gen Job by ID using SDKs Source: https://developer.box.com/reference/v2025.0/get-docgen-template-jobs-id These examples show how to retrieve a specific Document Generation job using the Box SDKs. The `templateId` is required for the call. ```dotnet await client.DocgenTemplate.GetDocgenTemplateJobByIdV2025R0Async(templateId: NullableUtils.Unwrap(fetchedDocgenTemplate.File).Id); ``` ```swift try await client.docgenTemplate.getDocgenTemplateJobByIdV2025R0(templateId: fetchedDocgenTemplate.file!.id) ``` ```java client.getDocgenTemplate().getDocgenTemplateJobByIdV2025R0(fetchedDocgenTemplate.getFile().getId()) ``` ```node await client.docgenTemplate.getDocgenTemplateJobByIdV2025R0( fetchedDocgenTemplate.file!.id, ); ``` ```python client.doc_gen_template.get_doc_gen_template_job_by_id_v2025_r0( fetched_docgen_template.file.id ) ``` -------------------------------- ### Create Metadata Instance on File (Node.js) Source: https://developer.box.com/reference/post-files-id-metadata-id-id Use the Node.js SDK to create a metadata instance on a file. This example demonstrates creating an instance with various data types. ```node await client.fileMetadata.createFileMetadataById( file.id, 'enterprise' as CreateFileMetadataByIdScope, templateKey, { ['name']: 'John', ['age']: 23, ['birthDate']: '2001-01-03T02:20:50.520Z', ['countryCode']: 'US', ['sports']: ['basketball', 'tennis'], }, ); ``` -------------------------------- ### Get User Avatar with Box SDKs Source: https://developer.box.com/reference/get-users-id-avatar Examples of how to retrieve a user's avatar using the Box SDKs for different programming languages. Ensure you have initialized the client with appropriate authentication. ```dotnet await client.Avatars.GetUserAvatarAsync(userId: user.Id); ``` ```swift try await client.avatars.getUserAvatar(userId: user.id, downloadDestinationUrl: destinationPath) ``` ```java client.getAvatars().getUserAvatar(user.getId()) ``` ```node await client.avatars.getUserAvatar(user.id); ``` ```python client.avatars.get_user_avatar(user.id) ``` -------------------------------- ### Create Archive using Python SDK Source: https://developer.box.com/reference/v2025.0/post-archives This Python example demonstrates creating an archive using the Box SDK. It passes the archive name and description as arguments. ```python client.archives.create_archive_v2025_r0(archive_name, description=archive_description) ``` -------------------------------- ### Restore File using Box SDKs Source: https://developer.box.com/reference/post-files-id Examples of how to restore a file from the trash using various Box SDKs. Ensure you have initialized the client with your credentials. ```csharp await client.TrashedFiles.RestoreFileFromTrashAsync(fileId: file.Id); ``` ```swift try await client.trashedFiles.restoreFileFromTrash(fileId: file.id) ``` ```java client.getTrashedFiles().restoreFileFromTrash(file.getId()) ``` ```javascript await client.trashedFiles.restoreFileFromTrash(file.id); ``` ```python client.trashed_files.restore_file_from_trash(file.id) ``` -------------------------------- ### Get Group Membership by ID Source: https://developer.box.com/reference/get-group-memberships-id This Node.js code example shows how to retrieve a group membership by its ID using the Box SDK. Make sure to replace `groupMembership.id` with the actual ID. ```node await client.memberships.getGroupMembershipById(groupMembership.id!); ``` -------------------------------- ### Create Metadata Instance on File (Java) Source: https://developer.box.com/reference/post-files-id-metadata-id-id Use the Java SDK to create a metadata instance on a file. This example demonstrates creating an instance with various data types. ```java client.getFileMetadata().createFileMetadataById(file.getId(), CreateFileMetadataByIdScope.ENTERPRISE, templateKey, mapOf(entryOf("name", "John"), entryOf("age", 23), entryOf("birthDate", "2001-01-03T02:20:50.520Z"), entryOf("countryCode", "US"), entryOf("sports", Arrays.asList("basketball", "tennis")))) ``` -------------------------------- ### Get Group Membership by ID Source: https://developer.box.com/reference/get-group-memberships-id This Swift code example shows how to retrieve a group membership using its ID with the Box SDK. It assumes you have an authenticated client and a group membership object. ```swift try await client.memberships.getGroupMembershipById(groupMembershipId: groupMembership.id!) ``` -------------------------------- ### List all collections using Box SDKs Source: https://developer.box.com/reference/get-collections Examples for listing collections using the Box SDKs in .NET, Swift, Node.js, and Python. ```dotnet await client.Collections.GetCollectionsAsync(); ``` ```swift try await client.collections.getCollections() ``` ```node await client.collections.getCollections(); ``` ```python client.collections.get_collections() ``` -------------------------------- ### Get metadata instance on folder (Java) Source: https://developer.box.com/reference/get-folders-id-metadata-id-id Retrieve folder metadata using the Java SDK. This example shows how to call the `getFolderMetadataById` method with the folder ID, scope, and template key. ```java client.getFolderMetadata().getFolderMetadataById(folder.getId(), GetFolderMetadataByIdScope.GLOBAL, "properties") ``` -------------------------------- ### Create Metadata Template ( .NET SDK) Source: https://developer.box.com/reference/post-metadata-templates-schema This .NET SDK example demonstrates how to create a metadata template. It shows the instantiation of the request body and the definition of various field types, including string, float, date, and enum. ```csharp await client.MetadataTemplates.CreateMetadataTemplateAsync(requestBody: new CreateMetadataTemplateRequestBody(scope: "enterprise", displayName: templateKey) { TemplateKey = templateKey, Fields = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.String, key: "testName", displayName: "testName"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Float, key: "age", displayName: "age"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Date, key: "birthDate", displayName: "birthDate"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Enum, key: "countryCode", displayName: "countryCode") { Options = Array.AsReadOnly(new [] { ``` -------------------------------- ### Get File Thumbnail using Box SDKs Source: https://developer.box.com/reference/get-files-id-thumbnail-id Examples of how to retrieve a file thumbnail using the Box SDKs for various programming languages. These snippets abstract the HTTP request details. ```dotnet await client.Files.GetFileThumbnailByIdAsync(fileId: thumbnailFile.Id, extension: GetFileThumbnailByIdExtension.Png); ``` ```swift try await client.files.getFileThumbnailById(fileId: thumbnailFile.id, extension_: GetFileThumbnailByIdExtension.png, downloadDestinationUrl: destinationPath) ``` ```java client.getFiles().getFileThumbnailById(thumbnailFile.getId(), GetFileThumbnailByIdExtension.PNG) ``` ```node await client.files.getFileThumbnailById( thumbnailFile.id, 'png' as GetFileThumbnailByIdExtension, ); ``` ```python client.files.get_file_thumbnail_by_id( thumbnail_file.id, GetFileThumbnailByIdExtension.PNG ) ``` -------------------------------- ### Create Metadata Template Source: https://developer.box.com/reference/post-metadata-templates-schema Examples of how to create a metadata template using different SDKs. ```APIDOC ## Create Metadata Template ### Description Creates a new metadata template for a given enterprise. ### Method POST ### Endpoint /metadataTemplates ### Request Body - **fields** (array) - Required - An array of field definitions for the template. - **type** (string) - Required - The type of the field (e.g., 'string', 'enum', 'multiSelect'). - **key** (string) - Required - A unique key for the field within the template. - **displayName** (string) - Required - The display name of the field. - **options** (array) - Optional - A list of options for enum or multiSelect fields. - **key** (string) - Required - The key for the option. ### Request Example ```json { "fields": [ { "type": "string", "key": "testName", "displayName": "testName" }, { "type": "float", "key": "age", "displayName": "age" }, { "type": "date", "key": "birthDate", "displayName": "birthDate" }, { "type": "enum", "key": "countryCode", "displayName": "countryCode", "options": [ { "key": "US" }, { "key": "CA" } ] }, { "type": "multiSelect", "key": "sports", "displayName": "sports", "options": [ { "key": "basketball" }, { "key": "football" }, { "key": "tennis" } ] } ] } ``` ### Response #### Success Response (201 Created) - **id** (string) - The ID of the created metadata template. - **type** (string) - The type of the object, always `metadata_template`. - **scope** (string) - The scope of the template (e.g., `global` or `enterprise_*`). - **templateKey** (string) - The unique key of the template. - **displayName** (string) - The display name of the template. #### Response Example ```json { "id": "58063d82-4128-7b43-bba9-92f706befcdf", "type": "metadata_template", "scope": "enterprise_123456", "templateKey": "productInfo", "displayName": "Product Information" } ``` ``` ```python client.metadata_templates.create_metadata_template( "enterprise", template_key, template_key=template_key, fields=[ CreateMetadataTemplateFields( type=CreateMetadataTemplateFieldsTypeField.STRING, key="testName", display_name="testName", ), CreateMetadataTemplateFields( type=CreateMetadataTemplateFieldsTypeField.FLOAT, key="age", display_name="age", ), CreateMetadataTemplateFields( type=CreateMetadataTemplateFieldsTypeField.DATE, key="birthDate", display_name="birthDate", ), CreateMetadataTemplateFields( type=CreateMetadataTemplateFieldsTypeField.ENUM, key="countryCode", display_name="countryCode", options=[ CreateMetadataTemplateFieldsOptionsField(key="US"), CreateMetadataTemplateFieldsOptionsField(key="CA"), ], ), CreateMetadataTemplateFields( type=CreateMetadataTemplateFieldsTypeField.MULTISELECT, key="sports", display_name="sports", options=[ CreateMetadataTemplateFieldsOptionsField(key="basketball"), CreateMetadataTemplateFieldsOptionsField(key="football"), CreateMetadataTemplateFieldsOptionsField(key="tennis"), ], ), ], ) ``` -------------------------------- ### Get AI Agent by ID using Node.js SDK Source: https://developer.box.com/reference/get-ai-agents-id Use this Node.js code to fetch an AI agent by its ID. The example demonstrates how to pass query parameters, such as specifying fields. ```node await client.aiStudio.getAiAgentById(createdAgent.id, { queryParams: { fields: ['ask'] } satisfies GetAiAgentByIdQueryParams, } satisfies GetAiAgentByIdOptionalsInput); ``` -------------------------------- ### Start Workflow with Parameters (Java) Source: https://developer.box.com/reference/post-workflows-id-start Initiates a workflow by providing detailed parameters including flow, files, and folder information. Ensure all required fields for `StartWorkflowRequestBody` are correctly populated. ```java adminClient.getWorkflows().startWorkflow(workflowToRun.getId(), new StartWorkflowRequestBody.Builder(new StartWorkflowRequestBodyFlowField.Builder().type("flow").id(workflowToRun.getFlows().get(0).getId()).build(), Arrays.asList(new StartWorkflowRequestBodyFilesField.Builder().type(StartWorkflowRequestBodyFilesTypeField.FILE).id(workflowFileId).build()), new StartWorkflowRequestBodyFolderField.Builder().type(StartWorkflowRequestBodyFolderTypeField.FOLDER).id(workflowFolderId).build()).type(StartWorkflowRequestBodyTypeField.WORKFLOW_PARAMETERS).build()) ``` -------------------------------- ### Get AI Agent by ID using Swift SDK Source: https://developer.box.com/reference/get-ai-agents-id Retrieve an AI agent by its ID using the Swift SDK. This example shows how to specify desired fields in the query parameters. ```swift try await client.aiStudio.getAiAgentById(agentId: createdAgent.id, queryParams: GetAiAgentByIdQueryParams(fields: ["ask"])); ``` -------------------------------- ### Create Folder using Java SDK Source: https://developer.box.com/reference/post-folders This Java example shows how to create a folder. Instantiate `CreateFolderRequestBody` with the desired name and parent folder ID. ```java client.getFolders().createFolder(new CreateFolderRequestBody(newFolderName, new CreateFolderRequestBodyParentField("0"))) ``` -------------------------------- ### Get Box Sign Request by ID (Python) Source: https://developer.box.com/reference/get-sign-requests-id Fetch a Box Sign request by its ID using the Python SDK. This example requires a client instance and a created sign request object. ```python client.sign_requests.get_sign_request_by_id(created_sign_request.id) ``` -------------------------------- ### Get Box Sign Request by ID (.NET) Source: https://developer.box.com/reference/get-sign-requests-id Retrieve a Box Sign request by its ID using the .NET SDK. This example assumes you have a client instance and a created sign request object. ```dotnet await client.SignRequests.GetSignRequestByIdAsync(signRequestId: NullableUtils.Unwrap(createdSignRequest.Id)); ``` -------------------------------- ### List Workflows using .NET SDK Source: https://developer.box.com/reference/get-workflows This example demonstrates how to list workflows using the Box .NET SDK. It requires an authenticated admin client and specifies the folder ID for the query. ```dotnet await adminClient.Workflows.GetWorkflowsAsync(queryParams: new GetWorkflowsQueryParams(folderId: workflowFolderId)); ```