DAM V2
Create images
Bulk-creates image records and returns a presigned upload url per image. Nabbit never receives the image bytes;
the consumer PUTs the bytes directly to upload_url and the image becomes active.
POST
/
api
/
v2
/
{team_slug}
/
{app_slug}
/
dam
/
images
Create images
curl --request POST \
--url https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"images": [
{
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"title": "<string>",
"alt": "<string>",
"copyright": "<string>",
"custom": {},
"public": true,
"created_with_ai": false,
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images"
payload = { "images": [
{
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"title": "<string>",
"alt": "<string>",
"copyright": "<string>",
"custom": {},
"public": True,
"created_with_ai": False,
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
images: [
{
filename: '<string>',
content_type: '<string>',
size_bytes: 123,
title: '<string>',
alt: '<string>',
copyright: '<string>',
custom: {},
public: true,
created_with_ai: false,
folder_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
parent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'images' => [
[
'filename' => '<string>',
'content_type' => '<string>',
'size_bytes' => 123,
'title' => '<string>',
'alt' => '<string>',
'copyright' => '<string>',
'custom' => [
],
'public' => true,
'created_with_ai' => false,
'folder_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'parent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images"
payload := strings.NewReader("{\n \"images\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"size_bytes\": 123,\n \"title\": \"<string>\",\n \"alt\": \"<string>\",\n \"copyright\": \"<string>\",\n \"custom\": {},\n \"public\": true,\n \"created_with_ai\": false,\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"images\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"size_bytes\": 123,\n \"title\": \"<string>\",\n \"alt\": \"<string>\",\n \"copyright\": \"<string>\",\n \"custom\": {},\n \"public\": true,\n \"created_with_ai\": false,\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images")
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 \"images\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"size_bytes\": 123,\n \"title\": \"<string>\",\n \"alt\": \"<string>\",\n \"copyright\": \"<string>\",\n \"custom\": {},\n \"public\": true,\n \"created_with_ai\": false,\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"upload_url": "<string>",
"expires_at": 123,
"constraints": {
"max_size_bytes": 123,
"allowed_types": [
"<string>"
]
}
}
],
"errors": [
{
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>"
}
]
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}Authorizations
Management API token, sent as Authorization: Bearer <token>.
Body
application/json
Required array length:
1 - 20 elementsShow child attributes
Show child attributes
⌘I
Create images
curl --request POST \
--url https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"images": [
{
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"title": "<string>",
"alt": "<string>",
"copyright": "<string>",
"custom": {},
"public": true,
"created_with_ai": false,
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images"
payload = { "images": [
{
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"title": "<string>",
"alt": "<string>",
"copyright": "<string>",
"custom": {},
"public": True,
"created_with_ai": False,
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
images: [
{
filename: '<string>',
content_type: '<string>',
size_bytes: 123,
title: '<string>',
alt: '<string>',
copyright: '<string>',
custom: {},
public: true,
created_with_ai: false,
folder_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
parent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'images' => [
[
'filename' => '<string>',
'content_type' => '<string>',
'size_bytes' => 123,
'title' => '<string>',
'alt' => '<string>',
'copyright' => '<string>',
'custom' => [
],
'public' => true,
'created_with_ai' => false,
'folder_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'parent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images"
payload := strings.NewReader("{\n \"images\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"size_bytes\": 123,\n \"title\": \"<string>\",\n \"alt\": \"<string>\",\n \"copyright\": \"<string>\",\n \"custom\": {},\n \"public\": true,\n \"created_with_ai\": false,\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"images\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"size_bytes\": 123,\n \"title\": \"<string>\",\n \"alt\": \"<string>\",\n \"copyright\": \"<string>\",\n \"custom\": {},\n \"public\": true,\n \"created_with_ai\": false,\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/images")
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 \"images\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"size_bytes\": 123,\n \"title\": \"<string>\",\n \"alt\": \"<string>\",\n \"copyright\": \"<string>\",\n \"custom\": {},\n \"public\": true,\n \"created_with_ai\": false,\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"upload_url": "<string>",
"expires_at": 123,
"constraints": {
"max_size_bytes": 123,
"allowed_types": [
"<string>"
]
}
}
],
"errors": [
{
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>"
}
]
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}