---
title: "Upload job artifacts"
method: POST
path: "/api/v4/jobs/{id}/artifacts"
tags: ["jobs"]
---

# Upload job artifacts

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

## Request

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

Uploads artifacts for a specified job.

## Path parameters

- `id` integer, required

## Request body

- PostApiV4JobsIdArtifacts: Upload job artifacts
  - `file` string, binary, required: The artifact file to store (generated by Multipart middleware)
  - `token` string: Job's authentication token
  - `expire_in` string: Specify when artifact should expire
  - `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
  - `artifact_format` 'raw' | 'zip' | 'gzip': The format of artifact
  - `metadata` string, binary: The artifact metadata to store (generated by Multipart middleware)
  - `accessibility` string: Specify accessibility level of artifact private/public

## Response `201`

Upload job artifacts

## Other responses

- `400`: Bad request
- `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)
