Skip to main content
POST
/
bindings
Create a binding
curl --request POST \
  --url https://api.pictify.io/bindings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "templateId": "<string>",
  "dataSource": {
    "type": "http",
    "url": "<string>",
    "method": "GET",
    "headers": {},
    "credentials": {
      "type": "api_key",
      "value": "<string>"
    }
  },
  "mapping": {},
  "name": "<string>",
  "defaults": {},
  "refreshPolicy": {
    "type": "ttl",
    "ttlSeconds": 123,
    "onError": "serve_stale"
  },
  "outputConfig": {
    "format": "png",
    "quality": 123
  }
}
'
{
  "binding": {
    "uid": "<string>",
    "name": "<string>",
    "templateId": "<string>",
    "dataSource": {
      "type": "http",
      "url": "<string>",
      "method": "GET"
    },
    "mapping": {},
    "defaults": {},
    "refreshPolicy": {
      "type": "ttl",
      "ttlSeconds": 123,
      "onError": "serve_stale"
    },
    "status": "active",
    "renderUrl": "<string>",
    "webhookUrl": "<string>",
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key obtained from the Pictify dashboard

Body

application/json
templateId
string
required
dataSource
object
required
mapping
object
required
name
string
defaults
object
refreshPolicy
object
outputConfig
object

Response

201 - application/json

Binding created

binding
object