ResourcesProducts

Create a product

Programmatically create a product using the following endpoint. See the code examples for how to create a new product with the SellApp API.

Programmatically create a product using the following endpoint. See the code examples for how to create a new product with the SellApp API.

Note

Unlike other endpoints, we will be using Multipart instead of JSON so we can add a product image.

If you do not wish to add a product image, you may modify the request and use JSON instead.

Note

This will create a draft product. To complete the product, create a variant via Create a product variant.

POST
/v2/products

Authorization

bearerAuth
AuthorizationBearer <token>

Provide your SellApp API key as a bearer token.

In: header

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://sell.app/api/v2/products" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "description": "string",    "visibility": "PUBLIC"  }'
{
  "data": {
    "id": 2,
    "title": "Immortality Elixir",
    "slug": "immortality-elixir",
    "description": "Want to live forever? Buy this now and I'll send a digital elixir that converts your soul into an NFT that will roam the internet for eternity!",
    "images": [
      {
        "path": "store/1/listings/qXZHzR15vs09zbfn3yui5jO6QK0IbQP4M6QVydUn.png",
        "metadata": {
          "size": 39289,
          "filename": "qXZHzR15vs09zbfn3yui5jO6QK0IbQP4M6QVydUn",
          "extension": "png",
          "mime_type": "image/png"
        }
      }
    ],
    "order": 2,
    "visibility": "PUBLIC",
    "delivery_text": "Thanks for purchasing! Here is a 20% off coupon for your next purchase: 20FREE24",
    "additional_information": [
      {
        "required": true,
        "key": "5ebae238c0afae7f4a4b96b30ff6f34c",
        "type": "checkbox",
        "label": "I agree to handing over my soul"
      },
      {
        "required": true,
        "key": "soul_transfer_email",
        "type": "email",
        "label": "Soul Transfer Email",
        "placeholder": "your.soul@example.com",
        "description": "We will send your digital elixir here"
      }
    ],
    "other_settings": {
      "faq": [
        {
          "answer": "Yes, trust me!",
          "question": "Will I really live forever?"
        }
      ],
      "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "redirect_url": "https://666.com/transfer-soul?customer_email=[customer_email]&order_id=[order_id]",
      "product_title": "The real elixir of immortality",
      "product_description": "Live forever, online."
    },
    "deleted_at": null,
    "created_at": "2024-01-10T12:16:10.000000Z",
    "updated_at": "2024-01-10T12:16:10.000000Z",
    "store_id": 1,
    "category_id": null,
    "section_id": null,
    "section_order": null,
    "is_discoverable": 1,
    "variants": [],
    "url": "https://example.sell.app/product/immortality-elixir"
  }
}