Skip to main content
Use this page when building integrations against the Box API. It covers authentication, core endpoints, SDKs, rate limits, error handling, pagination, and common pitfalls. For full page-by-page navigation, see llms.txt.

Base URL

Upload endpoints use a separate domain:

Authentication

Every request carries an access token in the Authorization header:

Methods

Token lifecycle

  • Access tokens expire after 60 minutes (expires_in in the response).
  • OAuth 2.0 returns a refresh token (valid 60 days, single use). Exchange it before it expires.
  • CCG and JWT apps request a new token with the same credentials.
  • All methods request tokens from POST https://api.box.com/oauth2/token.
Never commit credentials. Store client secrets, private keys, and tokens in environment variables or a secrets manager.
Guide: Authentication

Core endpoints

Reference: API reference

Rate limits and retry strategy

The API returns HTTP 429 when you exceed rate limits. The response includes a retry-after header with the number of seconds to wait. Strategy:
  1. Check for 429 status on every response.
  2. Read the retry-after header value.
  3. Wait at least that many seconds before retrying.
  4. Use exponential backoff with jitter for concurrent requests.
  5. Do not retry more than 5 times for the same request.
Rate-limit documentation: Rate limits

Error handling

Box returns errors as JSON with a type, status, code, and message:

Common status codes

Common-errors guide: Common errors

Pagination

Offset-based (default for most list endpoints)

Use offset and limit query parameters. The response includes total_count.
Offset-based pagination caps at 10,000 items. Switch to marker-based for larger sets.

Marker-based

Use usemarker=true and pass the next_marker value from the previous response.
Pagination guide: Pagination

SDKs

All SDKs are v10+. Do not use deprecated generated packages (box-typescript-sdk-gen, box-sdk-gen, or other *-sdk-gen artifacts).

Common gotchas

  • Folder 0 is root. All folder trees start at ID 0. Do not assume any other folder ID exists.
  • Service Accounts start empty. Invite them as collaborators to access existing content.
  • Scopes restrict tokens. A user may have access to a file, but the token still fails if the app lacks the required scope.
  • Uploads use a different domain. upload.box.com, not api.box.com.
  • Chunked uploads require exact part sizes except for the last part.
  • Webhook handlers must return 2xx within 30 seconds. Process events asynchronously if needed.
  • Webhook delivery is not ordered. Process events idempotently.
  • Metadata templates must exist before you apply instances to files.
  • Metadata queries are case-sensitive for template keys and field names.
  • Box AI endpoints require the “Manage AI” scope enabled on the app.

OpenAPI specification

The full OpenAPI 3.1 spec is published at:
Last modified on September 21, 2026