Skip to main content
POST
/
api
/
shares
Create Share
curl --request POST \
  --url https://api.rapidly.tech/api/shares/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "prices": [
    {
      "amount_type": "<string>",
      "price_amount": 50000024,
      "price_currency": "usd"
    }
  ],
  "metadata": {},
  "description": "<string>",
  "visibility": "public",
  "medias": [
    "<string>"
  ],
  "attached_custom_fields": [
    {
      "custom_field_id": "<string>",
      "required": true
    }
  ],
  "workspace_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
}
'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "description": "<string>",
  "visibility": "draft",
  "is_archived": true,
  "workspace_id": "<string>",
  "metadata": {},
  "prices": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "modified_at": "2023-11-07T05:31:56Z",
      "id": "<string>",
      "source": "catalog",
      "amount_type": "<string>",
      "price_currency": "aud",
      "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
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Schema for creating a share (one-time purchase).

name
string
required

The name of the share.

Minimum string length: 3
prices
(SharePriceFixedCreate · object | SharePriceCustomCreate · object | SharePriceFreeCreate · object)[]
required

List of available prices for this share. It should contain at most one static price (fixed, custom or free).

Minimum array length: 1

Schema to create a fixed price.

metadata
Metadata · object

Custom key-value attributes.

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

description
string | null

The description of the share.

visibility
enum<string>
default:public

The visibility of the share.

Available options:
draft,
private,
public
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[]

List of custom fields to attach.

workspace_id
string<uuid4> | null

The workspace ID.

Example:

"1dbfc517-0bbf-4301-9ba8-555ca42b9737"

Response

Share created.

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.