Import icons from a set
const url = 'http://localhost:3000/api/v1/icons';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"prefix":"example","icons":["example"],"fields":{"additionalProperty":"example"},"collections":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"tags":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The set, as Iconify names it: tabler, lucide, simple-icons
Its icons’ names, 100 at a time
Custom field values, keyed by field key
object
Examplegenerated
{ "prefix": "example", "icons": [ "example" ], "fields": { "additionalProperty": "example" }, "collections": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "tags": [ "example" ]}Responses
Section titled “Responses”The icons, in the order asked
object
object
Iconify’s name for it: tabler, lucide, simple-icons
Icons in it
A few of its icons’ names
Its icons carry their own colors; false: drawn in one color
The grid it is drawn on, in px
object
The asset’s own values
object
Values inherited from its collections; own values win
object
Draft, proposed (in review), active (approved), archived or rejected
The status; expired for an approved asset past its last day of use; deleted, until restored or purged
Its stack’s current approved version: the others are superseded by it
For a proposal: who made it, a person’s or an API key’s name
Why a person rejected it
Custom field values an agent suggested, waiting for a person to accept or dismiss
object
object
ISO 3166-1 alpha-2; empty: anywhere
Empty: any use
Set by a person; null or missing follows the license (see downloadable on its description)
object
The app that signed it
The signing certificate’s organization, as the file claims it; not verified
IPTC: digitalCapture, trainedAlgorithmicMedia…
The tool the actions name, often the model
Its own flag; it is private too when every collection it is in is
Served at /a/{id} to anyone while it may be used; otherwise to people who can see it, and signed URLs
Names the set doesn’t have
Example
{ "data": [ { "status": "draft", "state": "draft", "rights": { "modelRelease": "released" }, "origin": "shot", "via": "agent" } ]}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}