SmakeSmake API Docs
EndpointsTexts

List texts

GET
/texts

The endpoint lists all available texts.

Returns a collection of texts.

Filtering

You can filter your results as follows — see the filter[...] query parameters below:

  • List texts for specified id(s): /texts?filter[id]=1, /texts?filter[id]=1,2,3
  • List texts for specified collection name(s): /texts?filter[collection_name]=ordered, /texts?filter[collection_name]=custom

See: Pagination, Filtering

AuthorizationbearerAuth

Authorization

bearerAuth
AuthorizationBearer <token>

API token as bearer token — you receive a test and a live token, there is no switch between them. See Setup → Authentication and Setup → Test mode.

In: header

Query Parameters

page?integer

Page number to return — see Basic Usage → Pagination.

Default1
per_page?integer

Number of objects per page (default 25, maximum 100) — see Basic Usage → Pagination.

Rangevalue <= 100
Default25
filter[id]?string

List texts for specified id(s). Multiple ids are separated by comma (filter[id]=1,2,3).

filter[collection_name]?string

List texts for specified collection name(s), e.g. filter[collection_name]=ordered or filter[collection_name]=custom.

Header Parameters

Accept*"application/json"

The API only responds with JSON — this header is mandatory on every request (see Setup → Headers).

Default"application/json"

Value in

  • "application/json"

Response Body

application/json

application/json

Request example
curl -X GET "https://example.com/texts?filter%5Bid%5D=1%2C2%2C3&filter%5Bcollection_name%5D=ordered" \  -H "Accept: application/json"
{  "data": [    {      "id": 1,      "collection_name": "custom",      "production_method": {        "id": 1,        "collection_name": "dtg",        "handle": "dtg",        "name": "Direct to garmin",        "description": "Digital print",        "created_at": "2022-02-21T11:08:37+00:00",        "updated_at": "2022-02-21T11:08:37+00:00"      },      "media": [        {          "id": 240,          "is_test": 0,          "collection_name": "preview",          "file_name": "preview.png",          "size": 1218,          "mime_type": "image/png",          "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/e1fd546508dd484b908c5fc653f65818/preview.png",          "state": "completed",          "requested": null,          "failure_message": null,          "created_at": "2022-05-12T11:17:09+00:00",          "updated_at": "2022-05-12T11:17:09+00:00"        }      ],      "lines": [        {          "id": 1,          "value": "Example 1",          "font": {            "id": 1,            "family_name": "Roboto",            "style": "Bold"          },          "font_size": 13,          "padding_bottom": 18,          "horizontal_alignment": "left",          "bending_radius": "178.00",          "created_at": "2022-05-12T11:17:09+00:00",          "updated_at": "2022-05-12T11:17:09+00:00"        }      ],      "width": 76,      "height": 15,      "created_at": "2022-05-12T11:17:09+00:00",      "updated_at": "2022-05-12T11:17:09+00:00"    }  ],  "links": {    "first": "https://api.smake.io/v2/texts?page=1",    "last": null,    "prev": null,    "next": "https://api.smake.io/v2/texts?page=2"  },  "meta": {    "current_page": 1,    "from": 1,    "path": "https://api.smake.io/v2/texts",    "per_page": 15,    "to": 15  }}