---
name: box-integration-best-practices
description: Build, debug, or review repeatable Box API integrations and agent workflows for efficient calls, bulk work, and 429 handling.
title: box-integration-best-practices
canonical_url: https://skilld.dev/gh/box/skills/box-integration-best-practices
last_updated: 2026-10-15T05:04:44.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install box/skills/box-integration-best-practices`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/box-integration-best-practices`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/box/skills/box-integration-best-practices) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/box-integration-best-practices`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/box-integration-best-practices --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/box-integration-best-practices --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Box integration best practices

Preserve result coverage and permissions when reducing calls. For bulk work or 429 errors, estimate calls per completed item and peak request rate by Box actor and endpoint. Budget uploads and search against their separate limits. Check the current [rate limits](https://developer.box.com/guides/api-calls/permissions-and-errors/rate-limits); user, endpoint, enterprise, and temporary quality-of-service limits may apply.

## Reduce calls

For reviews, trace Box requests through loops and retry paths before changing concurrency or seeking more capacity.

- Reuse cached access tokens. Request fields needed for a decision in the list response when supported, and reuse returned data instead of fetching each item again. `fields` reduces call count only when it replaces a follow-up read.
- Use the largest useful supported page size. For large or changing collections, use [marker pagination](https://developer.box.com/guides/api-calls/pagination/marker-based) where supported; follow `next_marker` to completion and do not treat a marker as a durable checkpoint.
- Use webhooks or events with a catch-up path instead of repeated full scans. Deduplicate deliveries; checkpoint event stream positions after successful processing. Query supported [enterprise metadata templates](https://developer.box.com/guides/metadata/queries/limitations) instead of fetching metadata for every file.
- When content stays in Box, prefer Box-side copy, move, or update operations over download and re-upload.

## Control bulk work and retries

- Bound concurrency across workers sharing a Box actor, accounting for endpoint and enterprise limits. On 429, honor `Retry-After` across affected workers. Current official SDKs retry 429s; check the installed version before adding another retry layer. For direct HTTP, use bounded backoff with jitter.
- For long-running jobs, persist per-item outcomes so work can resume. Reconcile uncertain writes before retrying them.
- Refresh expired tokens on 401; pause if failures persist. For 403, record item-specific denials and pause when failures indicate actor or app access is wrong.
- If necessary traffic still exceeds available capacity after removing avoidable calls, surface the capacity need. Do not rotate identities to evade limits.

## Check the result

Record Box calls and 429s by actor, endpoint, and status; compare calls per completed item and completed-job throughput on a representative workload. Use the [Platform Activity report](https://support.box.com/hc/en-us/articles/4415109521171-Platform-Activity-Report) for historical per-app totals. If a token reaches a browser or other client-side component, [downscope it](https://developer.box.com/guides/authentication/tokens/downscope).
