POST
https://www.app.ocoya.com/api/_public/v1/studio-designs/{designId}/render
Render a Studio design
curl --request POST \
  --url https://www.app.ocoya.com/api/_public/v1/studio-designs/{designId}/render \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "fields": {
    "pixy-cmte4jx8o00ml3570hpuny2ze": "Summer sale, 20% off"
  }
}
'
{
  "id": "design_123",
  "name": "Weekly offer",
  "url": "https://perma.pixy.art/render.png",
  "mimetype": "image/png"
}

Authorizations

X-API-Keystringheaderrequired

Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.

Path Parameters

designIdstringrequired

Studio design ID, from GET /studio-designs.

Example:"design_123"

Query Parameters

brandIdstringrequired

Ocoya brand ID. Get one from GET /brands.

Example:"cmayvq3hk00017apshay5qezu"

Body

application/json
fieldsobject

Values keyed by field ID from GET /studio-designs/{designId}: text for text fields, an image URL for image fields, a CSS colour for colour fields. Fields left out keep the design's own content.

Example:
{
  "pixy-cmte4jx8o00ml3570hpuny2ze": "Summer sale, 20% off"
}

Response

application/json

Success

idstring

Studio design ID.

Example:"design_123"
namestring

Design name.

Example:"Weekly offer"
urlstring

The rendered PNG. Pass it in mediaUrls to POST /post to use it in a post.

Example:"https://perma.pixy.art/render.png"
mimetypestring

Always image/png.

Example:"image/png"