Skip to main content
PATCH
/
api
/
shares
/
{id}
Update Share
curl --request PATCH \
  --url https://api.rapidly.tech/api/shares/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {},
  "name": "<string>",
  "description": "<string>",
  "is_archived": true,
  "prices": [
    {
      "id": "<string>"
    }
  ],
  "medias": [
    "<string>"
  ],
  "attached_custom_fields": [
    {
      "custom_field_id": "<string>",
      "required": true
    }
  ]
}
'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "description": "<string>",
  "is_archived": true,
  "workspace_id": "<string>",
  "metadata": {},
  "prices": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "modified_at": "2023-11-07T05:31:56Z",
      "id": "<string>",
      "amount_type": "<string>",
      "is_archived": true,
      "share_id": "<string>",
      "price_amount": 123
    }
  ],
  "medias": [
    {
      "id": "<string>",
      "workspace_id": "<string>",
      "name": "<string>",
      "path": "<string>",
      "mime_type": "<string>",
      "size": 123,
      "storage_version": "<string>",
      "checksum_etag": "<string>",
      "checksum_sha256_base64": "<string>",
      "checksum_sha256_hex": "<string>",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "version": "<string>",
      "service": "<string>",
      "is_uploaded": true,
      "created_at": "2023-11-07T05:31:56Z",
      "size_readable": "<string>",
      "public_url": "<string>"
    }
  ],
  "attached_custom_fields": [
    {
      "custom_field_id": "<string>",
      "custom_field": {
        "created_at": "2023-11-07T05:31:56Z",
        "modified_at": "2023-11-07T05:31:56Z",
        "id": "<string>",
        "metadata": {},
        "type": "<string>",
        "slug": "<string>",
        "name": "<string>",
        "workspace_id": "<string>",
        "properties": {
          "form_label": "<string>",
          "form_help_text": "<string>",
          "form_placeholder": "<string>",
          "textarea": true,
          "min_length": 1073741823,
          "max_length": 1073741823
        }
      },
      "order": 123,
      "required": true
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.rapidly.tech/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Create an Workspace Access Token in your workspace's settings page.

Path Parameters

id
string<uuid4>
required

The share ID.

Body

application/json

Schema to update a share.

metadata
Metadata · object

Custom key-value attributes.

Keys: string, max 40 chars. Values: string (max 500 chars), integer, float, or boolean. Limit: 50 pairs.

name
string | null

The name of the share.

Minimum string length: 3
description
string | null

The description of the share.

is_archived
boolean | null

Whether the share is archived. If true, the share won't be available for purchase anymore.

visibility
enum<string> | null

The visibility of the share.

Available options:
draft,
private,
public
prices
(ExistingSharePrice · object | SharePriceFixedCreate · object | SharePriceCustomCreate · object | SharePriceFreeCreate · object)[] | null

List of available prices for this share. If you want to keep existing prices, include them in the list as an ExistingSharePrice object.

A price that already exists for this share.

Useful when updating a share if you want to keep an existing price.

medias
string<uuid4>[] | null

List of file IDs. Each one must be on the same workspace as the share, of type product_media and correctly uploaded.

attached_custom_fields
AttachedCustomFieldCreate · object[] | null

List of custom fields to attach.

Response

Share updated.

A share.

id
string<uuid4>
required

The ID of the object.

created_at
string<date-time>
required

Creation timestamp of the object.

modified_at
string<date-time> | null
required

Last modification timestamp of the object.

name
string
required

The name of the share.

description
string | null
required

The description of the share.

visibility
enum<string>
required

The visibility of the share.

Available options:
draft,
private,
public
is_archived
boolean
required

Whether the share is archived and no longer available.

workspace_id
string<uuid4>
required

The ID of the workspace owning the share.

metadata
object
required
prices
(SharePriceFixed · object | SharePriceCustom · object | SharePriceFree · object)[]
required

List of prices for this share.

A fixed price for a share.

medias
ShareMediaFileRead · object[]
required

List of medias associated to the share.

attached_custom_fields
AttachedCustomField · object[]
required

List of custom fields attached to the share.