Skip to content

Import icons from a set

POST
/api/v1/icons
curl --request POST \
--url http://localhost:3000/api/v1/icons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "prefix": "example", "icons": [ "example" ], "fields": { "additionalProperty": "example" }, "collections": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "tags": [ "example" ] }'

One SVG asset per icon, at the size it is drawn at, titled from its name, credited to the set’s author, with the set’s license in its rights and tagged icon and the set’s name. Fetched once and served from /a/{id} after, so nobody’s browser calls Iconify. Icons already here dedupe.

Scope: propose.

Media typeapplication/json
object
prefix
required

The set, as Iconify names it: tabler, lucide, simple-icons

string
<= 60 characters /^[a-z0-9]+(-[a-z0-9]+)*$/
icons
required

Its icons’ names, 100 at a time

Array<string>
>= 1 items <= 100 items
fields

Custom field values, keyed by field key

object
key
additional properties
collections
Array<string>
<= 50 items
tags
Array<string>
<= 100 items
Examplegenerated
{
"prefix": "example",
"icons": [
"example"
],
"fields": {
"additionalProperty": "example"
},
"collections": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"tags": [
"example"
]
}

The icons, in the order asked

Media typeapplication/json
object
set
required
object
prefix
required

Iconify’s name for it: tabler, lucide, simple-icons

string
name
required
string
total
required

Icons in it

integer
>= -9007199254740991 <= 9007199254740991
author
required
Any of:
object
name
required
string
url
string
license
required
Any of:
object
title
required
string
spdx
string
url
string
samples
required

A few of its icons’ names

Array<string>
category
required
string | null
palette
required

Its icons carry their own colors; false: drawn in one color

boolean
height
required

The grid it is drawn on, in px

number | null
data
required
Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
projectId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
sha256
required
string
filename
required
string
mime
required
string
size
required
integer
>= -9007199254740991 <= 9007199254740991
width
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
height
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
probe
required
Any of:
object
key
additional properties
metadata
required
Any of:
object
title
string
description
string
keywords
Array<string>
creator
string
copyright
string
capturedAt
string
camera
string
lens
string
gps
object
lat
required
number
lon
required
number
focus

The point crops keep in frame, 0 to 1 from the top left

object
x
required
number
y
required
number
tags
required
Array<string>
fields
required

The asset’s own values

object
key
additional properties
string | number | boolean
inherited
required

Values inherited from its collections; own values win

object
key
additional properties
string | number | boolean
status
required

Draft, proposed (in review), active (approved), archived or rejected

string
Allowed values: draft proposed active archived rejected
state
required

The status; expired for an approved asset past its last day of use; deleted, until restored or purged

string
Allowed values: draft proposed active expired archived rejected deleted
deletedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
stackId
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
version
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
current
required

Its stack’s current approved version: the others are superseded by it

boolean
proposedBy
required

For a proposal: who made it, a person’s or an API key’s name

string | null
reviewNote
required

Why a person rejected it

string | null
proposedTags
required
Array<string>
proposedFields
required

Custom field values an agent suggested, waiting for a person to accept or dismiss

object
key
additional properties
string | number | boolean
working
required
Any of:
object
label
required
string
by
required

The agent’s name

string
until
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
rights
required
Any of:
object
license
required
string | null
territories
required

ISO 3166-1 alpha-2; empty: anywhere

Array<string>
channels
required

Empty: any use

Array<string>
embargo
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
expires
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
modelRelease
required
Any of:
string
Allowed values: released missing not-needed
downloadable

Set by a person; null or missing follows the license (see downloadable on its description)

boolean | null
origin
required
Any of:
string
Allowed values: shot licensed generated
parentAssetId
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
generator
required
string | null
prompt
required
string | null
c2pa
required
Any of:
object
manifests
required
integer
>= -9007199254740991 <= 9007199254740991
generator
required

The app that signed it

string | null
title
required
string | null
signedBy
required

The signing certificate’s organization, as the file claims it; not verified

string | null
actions
required
Array<string>
digitalSourceType
required

IPTC: digitalCapture, trainedAlgorithmicMedia…

string | null
softwareAgent
required

The tool the actions name, often the model

string | null
ingredients
required
integer
>= -9007199254740991 <= 9007199254740991
via
required
Any of:
string
Allowed values: agent import
supersededBy
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
private
required

Its own flag; it is private too when every collection it is in is

boolean
public
required

Served at /a/{id} to anyone while it may be used; otherwise to people who can see it, and signed URLs

boolean
collections
required
Array<string>
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
missing
required

Names the set doesn’t have

Array<string>
Example
{
"data": [
{
"status": "draft",
"state": "draft",
"rights": {
"modelRelease": "released"
},
"origin": "shot",
"via": "agent"
}
]
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}