Upload Attachments
Attachments
Upload Attachment
Upload one or more attachments. Supports both JSON (base64) and multipart/form-data formats.
POST
Upload Attachments
Upload a single attachment to Penbox. Supports both JSON (base64) and multipart/form-data formats.
Size Limit: Maximum file size is 10GB per upload.
Query Parameters
Company UUID (optional if your token has company scope)
Request Body (JSON)
For JSON uploads, send base64-encoded file data:File name
Base64-encoded file content
MIME type (e.g., “application/pdf”, “image/jpeg”). Optional - will be detected if not provided.
Attachment visibility scope:
public or restrictedRequest Body (Multipart)
For multipart uploads, usemultipart/form-data with a file field.
Response Structure
Returns a single attachment object:Response Codes
| Code | Description |
|---|---|
201 | Created - File uploaded successfully |
400 | Bad Request - Invalid file data |
401 | Unauthorized - Invalid access token |
403 | Forbidden - No company scope in token |
413 | Payload Too Large - File exceeds 10GB limit |
429 | Too Many Requests - Rate limit exceeded |
500 | Server Error - Internal error |
Authorizations
API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}
Query Parameters
Workspace UUID (optional if token has workspace scope)