Base URL
Authentication
Every request carries an access token in theAuthorization header:
Methods
Token lifecycle
- Access tokens expire after 60 minutes (
expires_inin 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.
Core endpoints
Reference: API reference
Rate limits and retry strategy
The API returns HTTP 429 when you exceed rate limits. The response includes aretry-after header with the number of seconds to wait.
Strategy:
- Check for
429status on every response. - Read the
retry-afterheader value. - Wait at least that many seconds before retrying.
- Use exponential backoff with jitter for concurrent requests.
- Do not retry more than 5 times for the same request.
Error handling
Box returns errors as JSON with atype, status, code, and message:
Common status codes
Common-errors guide: Common errors
Pagination
Offset-based (default for most list endpoints)
Useoffset 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
Useusemarker=true and pass the next_marker value from the previous response.
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, notapi.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:- Source: box-openapi
- Bundled JSON: openapi.json
