---
title: "Create a new artifact."
method: POST
path: "/{spaceId}/artifacts"
tags: ["Artifacts"]
---

# Create a new artifact.

`POST /{spaceId}/artifacts`

Creates a new artifact.

## Path parameters

- `spaceId` string, required

## Request body

- CreateArtifactCommand — Creates a new artifact.
  - `Filename` string, required — The filename of the Artifact to create. An example might be "Performance Test Results.csv".
  - `LogCorrelationId` string — Gets the correlationId of the log block in which the artifact was captured
  - `ServerTaskId` string, required — The server task with which this artifact is associated.
  - `Source` string — A short summary of the source of this attachment. This will typically be the name of a step/machine, or "Uploaded by [username]" if the attachment was uploaded by a person.
  - `SpaceId` string, required — ID of the space

## Response `201`

Created

- ArtifactResource
  - `Created` string, date-time — Gets or sets the time at which the artifact was created.
  - `Filename` string, required — Gets or sets the filename of the Artifact to create. An example might be "Performance Test Results.csv".
  - `Id` string — Gets or sets a unique identifier for this resource.
  - `LastModifiedBy` string — Gets or sets the username of the user who last modified this resource.
  - `LastModifiedOn` string, date-time — Gets or sets the date/time that this resource was last modified.
  - `Links` object — Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  - `LogCorrelationId` string — Gets the correlationId of the log block in which the artifact was captured
  - `ServerTaskId` string — Gets or sets the server task with which this artifact is associated.
  - `Source` string — Gets or sets a short summary of the source of this attachment. This will typically be the name of a step/machine, or "Uploaded by [username]" if the attachment was uploaded by a person.
  - `SpaceId` string

## Other responses

- `400` — Bad request. Either the payload was not structurally valid or business rules did not permit the operation.
- `404` — Not found. One or more of the entities involved in the operation was not found.

---

[API](https://skmtc.net/octopus/apis/octopus-server-api.md) · [All operations](https://skmtc.net/octopus/apis/octopus-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/octopus/octopus-server-api/revisions/b296c3a60aa5/schema)
