Skip to content

Create or overwrite an artifact

PUT
/organizations/{organizationId}/environments/{environmentId}/artifacts/{key}
curl --request PUT \
--url https://api-dev.mindflow.io/v1/organizations/ORGA-57b858ed-ec60-4507-b2ef-ea58244ac742/environments/ENVI-57b858ed-ec60-4507-b2ef-ea58244ac742/artifacts/reports%2F2024%2Fq1-revenue \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Mindflow-Artifact-Data-Retention: 1d' \
--header 'X-Mindflow-Artifact-Description: Revenue report' \
--header 'X-Mindflow-Artifact-Write-Mode: create-or-replace' \
--data '"example"'

Stores request body content at the given key. Maximum artifact size is 6 MB. Write behavior is controlled by optional X-Mindflow-Artifact-Write-Mode (create-or-replace default; create-only; replace-only). Optional X-Mindflow-Artifact-Data-Retention defaults to 1d. Optional Description.

organizationId
required
Organization id

Opaque id of the organization that owns the resource. In a playbook step this can be filled from the current organization when the caller leaves it unset.

string
default: $CURRENT_ORGANIZATION_ID >= 1 characters <= 128 characters /^[^\p{C}]+$/

Opaque id of the organization. Pass it unchanged.

Example
ORGA-57b858ed-ec60-4507-b2ef-ea58244ac742
environmentId
required
Environment id

Opaque id of an environment. In a playbook step this can be filled from the current environment when the caller leaves it unset.

string
default: $CURRENT_ENVIRONMENT_ID >= 1 characters <= 128 characters /^[^\p{C}]+$/

Unique identifier of the environment where the artifact is stored. In the UI this is optional; when omitted, the current environment is used.

Example
ENVI-57b858ed-ec60-4507-b2ef-ea58244ac742
key
required
Key

Artifact key for this request: the {key} segment only (not organization or environment identifiers, which are separate path parameters). This is the user-chosen name of the artifact (e.g. CMDB or reports/2024/q1-revenue), not a generated opaque id—use the name the user gave exactly; do not invent ids such as 123CMDB4354. Use URL-safe characters (letters, digits, hyphens, underscores, dots, slashes). Slashes organize keys into logical groups. Must not contain .. or //, and must not end with /. maxLength limits this key string; non-ASCII UTF-8 characters consume multiple bytes of that budget. The service returns 400 if the key exceeds the limit.

string
>= 1 characters <= 750 characters

Key of the artifact to store, read, inspect, or delete. This is the user-chosen artifact name (e.g. CMDB), not a generated opaque id—pass the name exactly; do not invent ids like 123CMDB4354. URL-safe characters (letters, digits, hyphens, underscores, dots, slashes). Use slashes for logical groups (e.g. reports/2024/q1-revenue).

The Platform API also accepts the same key as extra URL segments after …/artifacts/; ingress collapses them into one {key} value. Must not contain .. or //, and must not end with /. See ArtifactKey schema for maxLength and other validation errors.

Example
reports/2024/q1-revenue
X-Mindflow-Artifact-Write-Mode
Write mode

Controls whether the write may create, replace, or both.

  • create-or-replace (default): Creates the artifact if the key does not exist, or overwrites it if it does. Always succeeds for a valid key.
  • create-only: Creates the artifact only when the key does not exist. Fails with 409 Conflict if the key already exists (no overwrite).
  • replace-only: Updates the artifact only when the key already exists. Fails with 404 Not Found if the key does not exist (no create).
string
default: create-or-replace
Allowed values: create-or-replace create-only replace-only
Example
create-or-replace

Write behavior. Optional; defaults to create-or-replace when omitted or invalid. See schema for options and behavior.

X-Mindflow-Artifact-Data-Retention
Data retention

Data retention period. After this duration the artifact is removed automatically. Use none for no expiration. Each value is a fixed retention period (no rounding).

string
default: 1d
Allowed values: 1d 2d 3d 7d 30d 90d 180d 365d none
Example
30d

Data retention. Optional; defaults to 1d when omitted or invalid. See schema for values and behavior.

X-Mindflow-Artifact-Description
Description

Human-readable description of the artifact (e.g. what it contains or its purpose). Max 512 characters. Total metadata size is limited (e.g. 2 KB UTF-8).

string
<= 512 characters
Example
Revenue report

Human-readable description of the artifact (e.g. what it contains or its purpose). Max 512 characters. Total metadata size is limited (e.g. 2 KB UTF-8); multi-byte characters may hit the limit before 512 characters.

Artifact bytes: set Content-Type like a normal HTTP request. Supported body media types (OpenAPI content keys): application/json (JSON value), application/xml (UTF-8 XML), and text/* (UTF-8 text, including text/xml). Runtime also accepts other application/*+xml subtypes (not listed as separate keys). Maximum size 6 MB.

JSON artifact

Any JSON value (request or response). Exactly one of the following (oneOf): object, array, string, number, boolean, or null. Max 6 MB.

<= 6291456 characters
Examplegenerated
example

Existing artifact overwritten.

Media typeapplication/json
Artifact metadata

Full metadata for an artifact, returned after a successful create-or-overwrite. All fields are present because they are known at write time.

object
organizationId
required

Organization that owns this artifact. Same value as the organizationId path parameter.

string
default: $CURRENT_ORGANIZATION_ID >= 1 characters <= 128 characters /^[^\p{C}]+$/
environmentId
required

Environment that stores this artifact. Same value as the environmentId path parameter.

string
default: $CURRENT_ENVIRONMENT_ID >= 1 characters <= 128 characters /^[^\p{C}]+$/
key
required

Artifact key that was written. Use this exact value on later get, replace, and delete calls.

string
>= 1 characters <= 750 characters
contentType
required

Media type of the body that was stored. JSON, text, and XML are accepted. Binary types are not.

string
>= 1 characters <= 255 characters /^[A-Za-z0-9!#$%&'*+.^_`|~-]+/[A-Za-z0-9!#$%&'*+.^_`|~-]+$/
contentLength
required

Size of the stored body, in bytes. The maximum is 6 MB.

integer format: int64
<= 6291456
etag
required

Entity tag for this version of the body. It changes when the body is replaced.

string
>= 1 characters <= 256 characters
lastModified
required

When the body was written, as ISO 8601 UTC.

string format: date-time
<= 29 characters
description

Optional note stored with the artifact. Absent when the write did not send one.

string
<= 512 characters
dataRetention
required

How long the artifact is kept. none means it does not expire. The default on write is 1d when you omit the header.

string
default: 1d
Allowed values: 1d 2d 3d 7d 30d 90d 180d 365d none
expiresAt

Time when the artifact is automatically deleted, as ISO 8601 UTC. Absent when dataRetention is none.

string format: date-time
<= 29 characters
Example
{
"organizationId": "$CURRENT_ORGANIZATION_ID",
"environmentId": "$CURRENT_ENVIRONMENT_ID",
"key": "CMDB",
"contentType": "application/json",
"contentLength": 4096,
"etag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
"lastModified": "2026-02-07T10:30:00Z",
"description": "Revenue report",
"dataRetention": "1d",
"expiresAt": "2026-05-08T10:30:00Z"
}
X-RateLimit-Limit
integer format: int32
>= 1 <= 1000
Example
1000

Maximum number of requests allowed in the current window. Present when this response is rate limited.

X-RateLimit-Remaining
integer format: int32
<= 1000
Example
42

Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.

X-RateLimit-Reset
string format: date-time
<= 29 characters
Example
2026-03-20T15:31:00.000Z

Time when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.

Retry-After
integer format: int32
>= 1 <= 3600
Example
30

HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.

Access-Control-Allow-Origin
string
Allowed values: *
Example
*

CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.

New artifact created.

Media typeapplication/json
Artifact metadata

Full metadata for an artifact, returned after a successful create-or-overwrite. All fields are present because they are known at write time.

object
organizationId
required

Organization that owns this artifact. Same value as the organizationId path parameter.

string
default: $CURRENT_ORGANIZATION_ID >= 1 characters <= 128 characters /^[^\p{C}]+$/
environmentId
required

Environment that stores this artifact. Same value as the environmentId path parameter.

string
default: $CURRENT_ENVIRONMENT_ID >= 1 characters <= 128 characters /^[^\p{C}]+$/
key
required

Artifact key that was written. Use this exact value on later get, replace, and delete calls.

string
>= 1 characters <= 750 characters
contentType
required

Media type of the body that was stored. JSON, text, and XML are accepted. Binary types are not.

string
>= 1 characters <= 255 characters /^[A-Za-z0-9!#$%&'*+.^_`|~-]+/[A-Za-z0-9!#$%&'*+.^_`|~-]+$/
contentLength
required

Size of the stored body, in bytes. The maximum is 6 MB.

integer format: int64
<= 6291456
etag
required

Entity tag for this version of the body. It changes when the body is replaced.

string
>= 1 characters <= 256 characters
lastModified
required

When the body was written, as ISO 8601 UTC.

string format: date-time
<= 29 characters
description

Optional note stored with the artifact. Absent when the write did not send one.

string
<= 512 characters
dataRetention
required

How long the artifact is kept. none means it does not expire. The default on write is 1d when you omit the header.

string
default: 1d
Allowed values: 1d 2d 3d 7d 30d 90d 180d 365d none
expiresAt

Time when the artifact is automatically deleted, as ISO 8601 UTC. Absent when dataRetention is none.

string format: date-time
<= 29 characters
Examples
Examplecreated

Created with data retention

{
"key": "reports/2024-q1-revenue",
"contentType": "application/json",
"contentLength": 58,
"etag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
"lastModified": "2026-02-07T10:30:00Z",
"description": "Revenue report",
"dataRetention": "90d",
"expiresAt": "2026-05-08T10:30:00Z"
}
X-RateLimit-Limit
integer format: int32
>= 1 <= 1000
Example
1000

Maximum number of requests allowed in the current window. Present when this response is rate limited.

X-RateLimit-Remaining
integer format: int32
<= 1000
Example
42

Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.

X-RateLimit-Reset
string format: date-time
<= 29 characters
Example
2026-03-20T15:31:00.000Z

Time when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.

Retry-After
integer format: int32
>= 1 <= 3600
Example
30

HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.

Access-Control-Allow-Origin
string
Allowed values: *
Example
*

CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.

The request was invalid. Common causes include:

  • Invalid timestamp format.
  • Using cursor with before or after.
  • Missing limit when using before or after.
  • Invalid field names in the fields parameter.

See the error response for specific details about what went wrong.

Media typeapplication/json
object
type

URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.

string format: uri-reference
default: about:blank <= 2048 characters
title
required

Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).

string
<= 256 characters /^[^\p{C}]+$/
status
required

HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).

integer format: int32
>= 100 <= 599
detail

Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).

string
<= 500 characters
instance

URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).

string format: uri-reference
<= 2048 characters
code

Always BAD_REQUEST on this response. Read detail for which value to change, then send a corrected request.

string
Allowed values: BAD_REQUEST
Example
{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request body or query is invalid.",
"code": "BAD_REQUEST"
}
X-RateLimit-Limit
integer format: int32
>= 1 <= 1000
Example
1000

Maximum number of requests allowed in the current window. Present when this response is rate limited.

X-RateLimit-Remaining
integer format: int32
<= 1000
Example
42

Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.

X-RateLimit-Reset
string format: date-time
<= 29 characters
Example
2026-03-20T15:31:00.000Z

Time when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.

Retry-After
integer format: int32
>= 1 <= 3600
Example
30

HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.

Access-Control-Allow-Origin
string
Allowed values: *
Example
*

CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.

Authentication failed. The request lacks valid credentials or the provided credentials are invalid.

Ensure you have:

  • A valid API key or token.
  • Proper authentication headers.
  • Required permissions.
Media typeapplication/json
object
type

URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.

string format: uri-reference
default: about:blank <= 2048 characters
title
required

Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).

string
<= 256 characters /^[^\p{C}]+$/
status
required

HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).

integer format: int32
>= 100 <= 599
detail

Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).

string
<= 500 characters
instance

URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).

string format: uri-reference
<= 2048 characters
code

Always MISSING_OR_INVALID_TOKEN on this response. Branch on this value, not on detail.

string
Allowed values: MISSING_OR_INVALID_TOKEN
Example
{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The bearer token is missing or invalid.",
"code": "MISSING_OR_INVALID_TOKEN"
}
X-RateLimit-Limit
integer format: int32
>= 1 <= 1000
Example
1000

Maximum number of requests allowed in the current window. Present when this response is rate limited.

X-RateLimit-Remaining
integer format: int32
<= 1000
Example
42

Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.

X-RateLimit-Reset
string format: date-time
<= 29 characters
Example
2026-03-20T15:31:00.000Z

Time when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.

Retry-After
integer format: int32
>= 1 <= 3600
Example
30

HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.

Access-Control-Allow-Origin
string
Allowed values: *
Example
*

CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.

The requested resource was not found.

Media typeapplication/json
object
type

URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.

string format: uri-reference
default: about:blank <= 2048 characters
title
required

Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).

string
<= 256 characters /^[^\p{C}]+$/
status
required

HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).

integer format: int32
>= 100 <= 599
detail

Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).

string
<= 500 characters
instance

URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).

string format: uri-reference
<= 2048 characters
code

Always NOT_FOUND on this response. The resource is not available to this caller.

string
Allowed values: NOT_FOUND
Example
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "The resource was not found.",
"code": "NOT_FOUND"
}
X-RateLimit-Limit
integer format: int32
>= 1 <= 1000
Example
1000

Maximum number of requests allowed in the current window. Present when this response is rate limited.

X-RateLimit-Remaining
integer format: int32
<= 1000
Example
42

Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.

X-RateLimit-Reset
string format: date-time
<= 29 characters
Example
2026-03-20T15:31:00.000Z

Time when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.

Retry-After
integer format: int32
>= 1 <= 3600
Example
30

HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.

Access-Control-Allow-Origin
string
Allowed values: *
Example
*

CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.

Conflict. The key already exists and the write mode is create-only. Use create-or-replace to overwrite, or use a different key.

Media typeapplication/json
object
type

URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.

string format: uri-reference
default: about:blank <= 2048 characters
title
required

Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).

string
<= 256 characters /^[^\p{C}]+$/
status
required

HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).

integer format: int32
>= 100 <= 599
detail

Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).

string
<= 500 characters
instance

URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).

string format: uri-reference
<= 2048 characters
code

Machine-readable error code for artifact conflict (create-only when key exists).

string
Allowed values: ARTIFACT_ALREADY_EXISTS
Example
{
"type": "about:blank",
"code": "ARTIFACT_ALREADY_EXISTS"
}
X-RateLimit-Limit
integer format: int32
>= 1 <= 1000
Example
1000

Maximum number of requests allowed in the current window. Present when this response is rate limited.

X-RateLimit-Remaining
integer format: int32
<= 1000
Example
42

Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.

X-RateLimit-Reset
string format: date-time
<= 29 characters
Example
2026-03-20T15:31:00.000Z

Time when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.

Retry-After
integer format: int32
>= 1 <= 3600
Example
30

HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.

Access-Control-Allow-Origin
string
Allowed values: *
Example
*

CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.

Too many requests. The request rate limit has been exceeded.

Please wait until the rate limit window resets before making additional requests.

Media typeapplication/json
object
type

URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.

string format: uri-reference
default: about:blank <= 2048 characters
title
required

Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).

string
<= 256 characters /^[^\p{C}]+$/
status
required

HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).

integer format: int32
>= 100 <= 599
detail

Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).

string
<= 500 characters
instance

URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).

string format: uri-reference
<= 2048 characters
code

Always RATE_LIMIT_EXCEEDED on this response. Wait Retry-After seconds before retrying.

string
Allowed values: RATE_LIMIT_EXCEEDED
Example
{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request rate limit has been exceeded.",
"code": "RATE_LIMIT_EXCEEDED"
}
X-RateLimit-Limit
integer format: int32
>= 1 <= 1000
Example
1000

Maximum number of requests allowed in the current window. Present when this response is rate limited.

X-RateLimit-Remaining
integer format: int32
<= 1000
Example
42

Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.

X-RateLimit-Reset
string format: date-time
<= 29 characters
Example
2026-03-20T15:31:00.000Z

Time when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.

Retry-After
integer format: int32
>= 1 <= 3600
Example
30

HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.

Access-Control-Allow-Origin
string
Allowed values: *
Example
*

CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.

Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.

Please try again later or contact support if the problem persists.

Media typeapplication/json
object
type

URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.

string format: uri-reference
default: about:blank <= 2048 characters
title
required

Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).

string
<= 256 characters /^[^\p{C}]+$/
status
required

HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).

integer format: int32
>= 100 <= 599
detail

Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).

string
<= 500 characters
instance

URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).

string format: uri-reference
<= 2048 characters
code

Always INTERNAL_ERROR on this response. Retry later. Do not retry a create in a tight loop.

string
Allowed values: INTERNAL_ERROR
Example
{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "The request could not be completed.",
"code": "INTERNAL_ERROR"
}
X-RateLimit-Limit
integer format: int32
>= 1 <= 1000
Example
1000

Maximum number of requests allowed in the current window. Present when this response is rate limited.

X-RateLimit-Remaining
integer format: int32
<= 1000
Example
42

Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.

X-RateLimit-Reset
string format: date-time
<= 29 characters
Example
2026-03-20T15:31:00.000Z

Time when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.

Retry-After
integer format: int32
>= 1 <= 3600
Example
30

HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.

Access-Control-Allow-Origin
string
Allowed values: *
Example
*

CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.