> ## Documentation Index
> Fetch the complete documentation index at: https://docs.envlink.projectinwork.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Store an artifact

> Send the file as the body. It's cut into chunks, sealed under the project's key and packed into object storage as it arrives. At most 2 GiB.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/artifacts
openapi: 3.1.0
info:
  title: envlink API
  version: 1.0.0
  description: >-
    Lease build environments, wire them to your sandbox, and keep snapshots and
    artifacts.
servers:
  - url: https://envlink-api.projectinwork.com
security:
  - bearerAuth: []
tags:
  - name: Environments
  - name: Templates
  - name: Sandboxes
  - name: Snapshots
  - name: Artifacts
  - name: Projects
  - name: Tokens
  - name: Usage
  - name: Account
paths:
  /v1/artifacts:
    post:
      tags:
        - Artifacts
      summary: Store an artifact
      description: >-
        Send the file as the body. It's cut into chunks, sealed under the
        project's key and packed into object storage as it arrives. At most 2
        GiB.
      parameters:
        - name: name
          in: query
          schema:
            type: string
          description: The name to store it under.
        - name: project
          in: query
          schema:
            type: string
          description: Whose key seals it; `default` when empty.
        - name: expires
          in: query
          schema:
            type: string
          description: How long to keep it, like 12h or 7d; at most 30d. 7d by default.
        - name: label
          in: query
          schema:
            type: string
          description: key=value; repeatable.
        - name: link
          in: query
          schema:
            type: string
          description: Also make a signed link lasting this long, like 24h.
      requestBody:
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '201':
          description: Stored
          content:
            application/json:
              schema:
                type: object
                properties:
                  artifact:
                    $ref: '#/components/schemas/Artifact'
                  link:
                    $ref: '#/components/schemas/Link'
        '413':
          description: Larger than 2 GiB
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: A bad name, project, expiry or label
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Artifact:
      type: object
      properties:
        id:
          type: string
          examples:
            - art_oha7mmjakblbfm6q
        project:
          type: string
        name:
          type: string
        size:
          type: integer
        sha256:
          type: string
        contentType:
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        keyVersion:
          type: integer
        manifest:
          type: string
        segments:
          type: array
          items:
            $ref: '#/components/schemas/Segment'
        chunks:
          type: integer
        sealedBytes:
          type: integer
        createdBy:
          type: string
        created:
          type: string
          format: date-time
        expires:
          type: string
          format: date-time
    Link:
      type: object
      properties:
        url:
          type: string
          format: uri
        expires:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong, for people.
        code:
          type: string
          description: >-
            A machine-readable code, when there is one: quota, no_template,
            not_found, …
      required:
        - error
    Segment:
      type: object
      properties:
        name:
          type: string
        size:
          type: integer
        objects:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A CLI token or an organization API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.