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": {
"url": "<string>",
"headers": {},
"credentials": {
"value": "<string>"
}
},
"mapping": {},
"name": "<string>",
"defaults": {},
"refreshPolicy": {
"ttlSeconds": 123
},
"outputConfig": {
"quality": 123
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: '<string>',
dataSource: {url: '<string>', headers: {}, credentials: {value: '<string>'}},
mapping: {},
name: '<string>',
defaults: {},
refreshPolicy: {ttlSeconds: 123},
outputConfig: {quality: 123}
})
};
fetch('https://api.pictify.io/bindings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pictify.io/bindings"
payload = {
"templateId": "<string>",
"dataSource": {
"url": "<string>",
"headers": {},
"credentials": { "value": "<string>" }
},
"mapping": {},
"name": "<string>",
"defaults": {},
"refreshPolicy": { "ttlSeconds": 123 },
"outputConfig": { "quality": 123 }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pictify.io/bindings"
payload := strings.NewReader("{\n \"templateId\": \"<string>\",\n \"dataSource\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"credentials\": {\n \"value\": \"<string>\"\n }\n },\n \"mapping\": {},\n \"name\": \"<string>\",\n \"defaults\": {},\n \"refreshPolicy\": {\n \"ttlSeconds\": 123\n },\n \"outputConfig\": {\n \"quality\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.pictify.io/bindings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateId\": \"<string>\",\n \"dataSource\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"credentials\": {\n \"value\": \"<string>\"\n }\n },\n \"mapping\": {},\n \"name\": \"<string>\",\n \"defaults\": {},\n \"refreshPolicy\": {\n \"ttlSeconds\": 123\n },\n \"outputConfig\": {\n \"quality\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"binding": {
"uid": "<string>",
"name": "<string>",
"templateId": "<string>",
"dataSource": {
"url": "<string>"
},
"mapping": {},
"defaults": {},
"refreshPolicy": {
"ttlSeconds": 123
},
"renderUrl": "<string>",
"webhookUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}Bindings
Create Binding
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": {
"url": "<string>",
"headers": {},
"credentials": {
"value": "<string>"
}
},
"mapping": {},
"name": "<string>",
"defaults": {},
"refreshPolicy": {
"ttlSeconds": 123
},
"outputConfig": {
"quality": 123
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: '<string>',
dataSource: {url: '<string>', headers: {}, credentials: {value: '<string>'}},
mapping: {},
name: '<string>',
defaults: {},
refreshPolicy: {ttlSeconds: 123},
outputConfig: {quality: 123}
})
};
fetch('https://api.pictify.io/bindings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pictify.io/bindings"
payload = {
"templateId": "<string>",
"dataSource": {
"url": "<string>",
"headers": {},
"credentials": { "value": "<string>" }
},
"mapping": {},
"name": "<string>",
"defaults": {},
"refreshPolicy": { "ttlSeconds": 123 },
"outputConfig": { "quality": 123 }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pictify.io/bindings"
payload := strings.NewReader("{\n \"templateId\": \"<string>\",\n \"dataSource\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"credentials\": {\n \"value\": \"<string>\"\n }\n },\n \"mapping\": {},\n \"name\": \"<string>\",\n \"defaults\": {},\n \"refreshPolicy\": {\n \"ttlSeconds\": 123\n },\n \"outputConfig\": {\n \"quality\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.pictify.io/bindings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateId\": \"<string>\",\n \"dataSource\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"credentials\": {\n \"value\": \"<string>\"\n }\n },\n \"mapping\": {},\n \"name\": \"<string>\",\n \"defaults\": {},\n \"refreshPolicy\": {\n \"ttlSeconds\": 123\n },\n \"outputConfig\": {\n \"quality\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"binding": {
"uid": "<string>",
"name": "<string>",
"templateId": "<string>",
"dataSource": {
"url": "<string>"
},
"mapping": {},
"defaults": {},
"refreshPolicy": {
"ttlSeconds": 123
},
"renderUrl": "<string>",
"webhookUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}Authorizations
API key obtained from the Pictify dashboard
Body
application/json
Response
201 - application/json
Binding created
Show child attributes
Show child attributes
⌘I