# Upload badge

URL: /en/docs/api/v1/subprocessors/id/badge/put
Last Updated: 2026-07-30T21:15:30.668Z

## Description
No description available.

## Available Actions
- Execute PUT request
- View request parameters
- View response schema
- Get code examples
- Navigate to related topics
- View step-by-step instructions
- Get best practices

## Content
### PUT /api/v1/subprocessors/{id}/badge

**Upload badge**

Upload a badge image for the specified subprocessor. Supports image formats (PNG, JPEG, GIF, SVG, WebP) up to 2&nbsp;MB.

**Authentication:** Bearer token (`Authorization: Bearer <token>`)

**Path parameters:**

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | Yes | Subprocessor ID |

**Request body** (`multipart/form-data`) - required:

- `file` (string (binary), required): Badge image file (PNG, JPEG, GIF, SVG, WebP)

**Responses:**

- `200` - Badge uploaded successfully
  - `success` (boolean)
  - `data` (object)
    - `fileId` (string): Directus file ID for the uploaded badge
    - `url` (string (uri)): Public URL for the uploaded badge
- `400` - Validation error
  - `error` (string)

  Example (No file provided):
  
  ```json
  {
  "error": "file_required"
}
  ```

  Example (Unsupported image type):
  
  ```json
  {
  "error": "badge_invalid_type"
}
  ```
- `401` - Unauthorized - missing or invalid token
- `403` - Forbidden - requesting tenant does not own the subprocessor
- `404` - Subprocessor not found
- `413` - Uploaded file exceeds the configured limit
  - `error` (string)
- `415` - Unsupported media type
  - `error` (string)
- `500` - Internal server error
  - `error` (string)

**Code samples:**

cURL:

```bash
curl -X PUT "https://app.orbiqhq.com/api/v1/subprocessors/{id}/badge" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -F "file=@/path/to/badge.png"
```

