---
title: "Authorize artifacts upload"
method: POST
path: "/api/v4/jobs/{id}/artifacts/authorize"
tags: ["jobs"]
---

# Authorize artifacts upload

`POST /api/v4/jobs/{id}/artifacts/authorize`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/jobs/{id}/artifacts/authorize`
- Auth: none declared

Authorizes uploading artifacts for a specified job.

## Path parameters

- `id` integer, required

## Request body

- PostApiV4JobsIdArtifactsAuthorize: Authorize artifacts upload
  - `token` string: Job's authentication token
  - `filesize` integer: Size of artifact file
  - `artifact_type` 'archive' | 'metadata' | 'trace' | 'junit' | 'sast' | 'dependency_scanning' | 'container_scanning' | 'dast' | 'codequality' | 'license_scanning' | 'performance' | 'metrics' | 'metrics_referee' | 'network_referee' | 'lsif' | 'dotenv' | 'cobertura' | 'terraform' | 'accessibility' | 'cluster_applications' | 'secret_detection' | 'requirements' | 'coverage_fuzzing' | 'browser_performance' | 'load_performance' | 'api_fuzzing' | 'cluster_image_scanning' | 'cyclonedx' | 'requirements_v2' | 'annotations' | 'repository_xray' | 'jacoco' | 'sarif': The type of artifact

## Response `200`

Upload allowed

## Other responses

- `403`: Forbidden
- `405`: Artifacts support not enabled
- `413`: File too large
- `429`: Too Many Requests

---

[API](https://skmtc.dev/gitlab/apis/gitlab-api.md) - [All operations](https://skmtc.dev/gitlab/apis/gitlab-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitlab/apis/gitlab-api/revisions/b234947ef3f2?raw)
