Skip to content

Create Image

POST/images

Create a new image.

Attributes

AttributeTypeDescription
type *string
providerstringImage provider, e.g. "s3".
public_idstringProvider-specific image key.
urlstring
base64string
descriptionstring
titlestring
linkstring
ordernumber
widthnumber
heightnumber
contentobject
blockIdnumber
blockStyleIdnumber
themeIdnumber
eventIdnumber
workspaceIdnumber

Fields marked with * are required.

Request

js
import Confetti from 'confetti'

const confetti = new Confetti({ apiKey: 'your-key' })

const image = await confetti.images.create({
  type: 'ticket.attending',
  title: 'example',
})
sh
curl -X POST "https://api.confetti.events/images" \
  -H "Content-Type: application/json" \
  -H "Authorization: apikey your-key" \
  -d '{
  "data": {
    "type": "image",
    "attributes": {
      "type": "ticket.attending",
      "title": "example"
    }
  }
}'