# Upload certification file

URL: /en/docs/api/v1/certifications/id/filetype/put
Last Updated: 2026-07-30T21:15:30.501Z

## 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/certifications/{id}/{filetype}

**Upload certification file**

Upload a file for a certification. Supports two file types: - `document`: PDF files up to 1.5MB for certification documents - `badge`: Image files up to 100KB for certification badges (PNG, JPEG, GIF, SVG, WebP)

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

**Path parameters:**

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes | Certification ID |
| `filetype` | enum: document \| badge | Yes | Type of file to upload |

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

- `file` (string (binary), required): File to upload (PDF for documents, image for badges)

**Responses:**

- `200` - File uploaded successfully
  - `success` (boolean)
  - `data` (object)
    - `fileId` (string): Uploaded file ID in Directus
    - `url` (string (uri)): URL to access the uploaded file
- `400` - Bad Request - validation failed
  - `error` (string)

  Example (Invalid file type):
  
  ```json
  {
  "error": "document_invalid_type"
}
  ```

  Example (File too large):
  
  ```json
  {
  "error": "document_too_large"
}
  ```

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

  Example (Invalid path parameters):
  
  ```json
  {
  "error": "invalid_path_parameters"
}
  ```
- `401` - Unauthorized - invalid or missing token
- `403` - Forbidden - insufficient permissions
- `404` - Certification not found
- `415` - Unsupported Media Type
  - `error` (string)
- `500` - Internal server error
  - `error` (string)

**Code samples:**

cURL (Multipart Upload):

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

