Sividocs

Create Dimension Set

Create a new dimension set in the authenticated workspace. A dimension set groups one or more size definitions that can be used for design generation.

Endpoint

POST dimensionSet/create

Authentication

Include your Enterprise API credentials in the request headers:

sivi-api-key: YOUR_API_KEY

Request Body Example

{
  "name": "My Banner Set",
  "sizes": [
    {
      "dimension": { "width": 600, "height": 300 },
      "medium": "displayAds",
      "mediumType": "displayAds-half-page-ad"
    },
    {
      "dimension": { "width": 300, "height": 300 }
    }
  ],
  "defaultSizeId": null
}

Request Parameters

ParameterTypeRequiredDescription
sizesArrayYesList of size definitions (min 1)
sizes[].dimensionObjectYesSize dimensions
sizes[].dimension.widthNumberYesWidth in pixels (must be > 0)
sizes[].dimension.heightNumberYesHeight in pixels (must be > 0)
sizes[].mediumStringNoMedium type (e.g. displayAds). Defaults to custom
sizes[].mediumTypeStringNoMedium subtype (e.g. displayAds-half-page-ad). Defaults to custom
defaultSizeIdStringNoThe default size ID. Defaults to the first size's sId if omitted; must match a sId in sizes
nameStringNoDisplay name of the dimension set. Defaults to Banner Set
abstractUserIdStringNoUnique identifier for the user (Enterprise/Super API only)

Response

Success Response (200 OK)

{
  "status": 200,
  "body": {
    "dimensionSet": {
      "bSDId": "bsd_abc123",
      "wId": "w_abc123",
      "system": "USER",
      "name": "My Banner Set",
      "defaultSizeId": "s_xyz789",
      "sizes": [
        {
          "sId": "s_xyz789",
          "dimension": { "width": 600, "height": 300 },
          "medium": "displayAds",
          "mediumType": "displayAds-half-page-ad"
        },
        {
          "sId": "s_def456",
          "dimension": { "width": 300, "height": 300 },
          "medium": "custom",
          "mediumType": "custom"
        }
      ],
      "createdOn": 1723300000,
      "updatedOn": 1723300000
    }
  }
}

Response Body Parameters

ParameterTypeDescription
bSDIdStringDimension set identifier
wIdStringWorkspace ID the set belongs to
systemStringAlways USER for API-created sets
nameStringDisplay name of the dimension set
defaultSizeIdStringThe default size ID within the set
sizesArrayList of size definitions
sizes[].sIdStringSize identifier
sizes[].dimensionObjectSize dimensions
sizes[].dimension.widthNumberWidth in pixels
sizes[].dimension.heightNumberHeight in pixels
sizes[].mediumStringMedium type
sizes[].mediumTypeStringMedium subtype
createdOnNumberCreation timestamp
updatedOnNumberLast update timestamp

Error Responses

Authentication Error (401 Unauthorized)

{
  "status": 401,
  "body": {
    "message": "Failed to authenticate request. Please add sivi-api-key header in request"
  }
}

Invalid Input (422 Unprocessable Entity)

{
  "status": 422,
  "body": {
    "message": "sizes must have at least one element"
  }
}

Server Error (500 Internal Server Error)

{
  "status": 500,
  "body": {
    "message": "Server internal error"
  }
}

Usage Notes

  • wId is derived from the authenticated session and cannot be set in the request body
  • All API-created dimension sets are USER records; SYSTEM records cannot be created via the API
  • A unique bSDId is auto-generated for each new dimension set
  • If defaultSizeId is omitted, the first size's auto-generated sId is used
  • sId for each size is auto-generated; providing it in the request will result in a validation error