Nuvelics documentation
APIAPI reference

Social layouts

Import and manage the layouts that arrange the cards of your social posts.

POST
/api/tenant/v1/social-layouts/import

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Request Body

application/json
  1. body
assetIds*array<>

Completed layout_import uploads, one per card of the post; each is deleted once read

Items1 <= items <= 10

Response Body

One candidate per image, in the order sent: a layout to review, or why the image could not be read as one. Nothing is saved, and every image is deleted.

application/json
  1. response
candidates*array<|>
Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/social-layouts/import' \  -H 'Content-Type: application/json' \  -d '{  "assetIds": [    "string"  ]}'
Example Response
{  "candidates": [    {      "assetId": "string",      "status": "ok",      "layout": {        "photo": true,        "shapes": [          {            "type": "box",            "anchor": "top",            "x": 0,            "y": 0,            "w": 1,            "h": 1,            "fill": "background",            "radius": 0          }        ],        "boxes": [          {            "role": "kicker",            "anchor": "top",            "x": 0,            "y": 0,            "w": 1,            "h": 1,            "ground": "background",            "tag": true,            "align": "left",            "valign": "top",            "case": "asWritten",            "face": "display",            "weight": 400,            "italic": true,            "maxSize": 12,            "cap": 1,            "emphasis": true          }        ],        "logo": {          "placement": "kit",          "pill": true        },        "formats": [          "3:4"        ]      },      "sourceFormat": "3:4",      "offShape": true,      "colors": [        {          "hex": "string",          "role": "background"        }      ],      "creditAdded": true,      "unexpressed": [        "string"      ]    }  ]}
GET
/api/tenant/v1/social-layouts

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Query Parameters

isActive?string

Narrow the list to active (true) or retired (false) layouts

Value in"true""false"

Response Body

The org's own social layouts

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.nuvelics.com/api/tenant/v1/social-layouts'
Example Response
{  "items": [    {      "id": "string",      "orgId": "string",      "name": "string",      "isActive": true,      "createdAt": "2019-08-24T14:15:22Z",      "layout": {        "photo": true,        "shapes": [          {            "type": "box",            "anchor": "top",            "x": 0,            "y": 0,            "w": 1,            "h": 1,            "fill": "background",            "radius": 0          }        ],        "boxes": [          {            "role": "kicker",            "anchor": "top",            "x": 0,            "y": 0,            "w": 1,            "h": 1,            "ground": "background",            "tag": true,            "align": "left",            "valign": "top",            "case": "asWritten",            "face": "display",            "weight": 400,            "italic": true,            "maxSize": 12,            "cap": 1,            "emphasis": true          }        ],        "logo": {          "placement": "kit",          "pill": true        },        "formats": [          "3:4"        ]      },      "sourceUrl": "http://example.com"    }  ]}
POST
/api/tenant/v1/social-layouts

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Request Body

application/json
  1. body
name*string

Display name of the layout

Length1 <= length <= 120
sourceUrl?string

Link to the post the layout was imported from; stored, never fetched

Formaturi
Lengthlength <= 2048
candidate*
sourceFormat*string

The shape the candidate was read at, as the import returned it; it is always among the saved formats

Value in"3:4""4:5""1:1""9:16"
boxes*array<>

One entry per candidate box, in order: its role and cap (never above the candidate's, or the new role's default if that is higher), or null to remove it

shapes*array<boolean>

One entry per candidate shape, in order: false removes it

formats*array<>

Shapes the layout is offered in, among the candidate's

Items1 <= items

Response Body

Social layout created

application/json
  1. response
id*string

Org social layout identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string
name*string

Display name of the layout

Length1 <= length <= 120
isActive*boolean

An inactive layout is out of the template picker; templates already naming it keep generating with it

createdAt*string
Formatdate-time
layout*
sourceUrl?string

Link to the post the layout was imported from; stored, never fetched

Formaturi
Lengthlength <= 2048
Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/social-layouts' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "candidate": {    "photo": true,    "shapes": [      {        "type": "box",        "anchor": "top",        "x": 0,        "y": 0,        "w": 1,        "h": 1,        "fill": "background",        "radius": 0      }    ],    "boxes": [      {        "role": "kicker",        "anchor": "top",        "x": 0,        "y": 0,        "w": 1,        "h": 1,        "ground": "background",        "tag": true,        "align": "left",        "valign": "top",        "case": "asWritten",        "face": "display",        "weight": 400,        "italic": true,        "maxSize": 12,        "cap": 1,        "emphasis": true      }    ],    "logo": {      "placement": "kit",      "pill": true    },    "formats": [      "3:4"    ]  },  "sourceFormat": "3:4",  "boxes": [    {      "role": "kicker",      "cap": 1    }  ],  "shapes": [    true  ],  "formats": [    "3:4"  ]}'
Example Response
{  "id": "string",  "orgId": "string",  "name": "string",  "isActive": true,  "createdAt": "2019-08-24T14:15:22Z",  "layout": {    "photo": true,    "shapes": [      {        "type": "box",        "anchor": "top",        "x": 0,        "y": 0,        "w": 1,        "h": 1,        "fill": "background",        "radius": 0      }    ],    "boxes": [      {        "role": "kicker",        "anchor": "top",        "x": 0,        "y": 0,        "w": 1,        "h": 1,        "ground": "background",        "tag": true,        "align": "left",        "valign": "top",        "case": "asWritten",        "face": "display",        "weight": 400,        "italic": true,        "maxSize": 12,        "cap": 1,        "emphasis": true      }    ],    "logo": {      "placement": "kit",      "pill": true    },    "formats": [      "3:4"    ]  },  "sourceUrl": "http://example.com"}

Get a social layout

GET
/api/tenant/v1/social-layouts/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Org social layout identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

The social layout

application/json
  1. response
id*string

Org social layout identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string
name*string

Display name of the layout

Length1 <= length <= 120
isActive*boolean

An inactive layout is out of the template picker; templates already naming it keep generating with it

createdAt*string
Formatdate-time
layout*
sourceUrl?string

Link to the post the layout was imported from; stored, never fetched

Formaturi
Lengthlength <= 2048
Example Request
curl -X GET 'https://api.nuvelics.com/api/tenant/v1/social-layouts/string'
Example Response
{  "id": "string",  "orgId": "string",  "name": "string",  "isActive": true,  "createdAt": "2019-08-24T14:15:22Z",  "layout": {    "photo": true,    "shapes": [      {        "type": "box",        "anchor": "top",        "x": 0,        "y": 0,        "w": 1,        "h": 1,        "fill": "background",        "radius": 0      }    ],    "boxes": [      {        "role": "kicker",        "anchor": "top",        "x": 0,        "y": 0,        "w": 1,        "h": 1,        "ground": "background",        "tag": true,        "align": "left",        "valign": "top",        "case": "asWritten",        "face": "display",        "weight": 400,        "italic": true,        "maxSize": 12,        "cap": 1,        "emphasis": true      }    ],    "logo": {      "placement": "kit",      "pill": true    },    "formats": [      "3:4"    ]  },  "sourceUrl": "http://example.com"}
PATCH
/api/tenant/v1/social-layouts/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Org social layout identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Request Body

application/json
  1. body
name?string

Display name of the layout

Length1 <= length <= 120
isActive?boolean
formats?array<>

Still formats the layout is offered in

Items1 <= items

Response Body

Social layout updated

application/json
  1. response
id*string

Org social layout identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string
name*string

Display name of the layout

Length1 <= length <= 120
isActive*boolean

An inactive layout is out of the template picker; templates already naming it keep generating with it

createdAt*string
Formatdate-time
layout*
sourceUrl?string

Link to the post the layout was imported from; stored, never fetched

Formaturi
Lengthlength <= 2048
Example Request
curl -X PATCH 'https://api.nuvelics.com/api/tenant/v1/social-layouts/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "orgId": "string",  "name": "string",  "isActive": true,  "createdAt": "2019-08-24T14:15:22Z",  "layout": {    "photo": true,    "shapes": [      {        "type": "box",        "anchor": "top",        "x": 0,        "y": 0,        "w": 1,        "h": 1,        "fill": "background",        "radius": 0      }    ],    "boxes": [      {        "role": "kicker",        "anchor": "top",        "x": 0,        "y": 0,        "w": 1,        "h": 1,        "ground": "background",        "tag": true,        "align": "left",        "valign": "top",        "case": "asWritten",        "face": "display",        "weight": 400,        "italic": true,        "maxSize": 12,        "cap": 1,        "emphasis": true      }    ],    "logo": {      "placement": "kit",      "pill": true    },    "formats": [      "3:4"    ]  },  "sourceUrl": "http://example.com"}

Delete a social layout

DELETE
/api/tenant/v1/social-layouts/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Org social layout identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

Social layout deleted

Example Request
curl -X DELETE 'https://api.nuvelics.com/api/tenant/v1/social-layouts/string'
Example Response
Empty

Report a problem with this page

On this page