Skip to content

Metadata

By , Head of IntegrationsUpdated

Open this page in a new chat

Short answer

Metadata commands read and set the details stored with each file: title, description, tags, product details, approval status and the point of interest that crops keep in view. Use GET to read a value, POST to set it and DELETE to remove tags or a point of interest. You can search files by their metadata.

After reading this you will know

  • How to read and set titles, descriptions and tags
  • How to add product details and an approval status
  • How to set the point of interest that crops keep in view

Every command on this page needs a bearer token.

POSThttps://api.sirv.com/v2/files/meta/tags

Use this API method to add a meta tag to a file or folder.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
tagsarray of stringYes["blue","lake","winter","cold","water"]Tags to add to the file.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/tags?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"tags": [
"blue",
"lake",
"winter",
"cold",
"water"
]
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

DELETEhttps://api.sirv.com/v2/files/meta/tags

Use this API method to delete a meta tag from a file or folder.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
tagsarray of stringYes["ocean"]Tags to remove from the file.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/tags?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'DELETE',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"tags": [
"ocean"
]
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

DELETEhttps://api.sirv.com/v2/files/poi

Use this API method to delete POI (point of interest) on the image.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
namestringNoBlueLakeName of the POI

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/poi?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'DELETE',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"name": "BlueLake"
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

GEThttps://api.sirv.com/v2/files/meta

Get all the meta for a file, in a single request.

Unlike the API methods for getting meta title, description, tags and product data, this API method will return all meta data, making it the fastest and easiest way to get meta via the API. (You can also get file meta simply by requesting a file URL with ?info appended - example)

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"tags": [
"lake",
"water"
],
"title": "Blue Lake",
"description": "Blue Lake in the Winter",
"product": {
"id": "LLBB77",
"name": "Blue Lake Card",
"brand": "BLUE LAKE LLC",
"category1": "Cards",
"category2": "Lakes"
},
"approval": {
"datetime": "2026-02-23T14:08:00.165Z",
"approved": false,
"comment": "It looks too cold!"
}
}
GEThttps://api.sirv.com/v2/files/meta/approval

Use this API method to get the file approval tag and optional comment for a file.

Used as part of an image review and approval process.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/approval?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"datetime": "2026-02-23T13:54:04.440Z",
"approved": false,
"comment": "It looks too cold!"
}
GEThttps://api.sirv.com/v2/files/meta/tags

Use this API method to get all the meta tags of a file or folder.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/tags?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"tags": [
"lake",
"water"
]
}
GEThttps://api.sirv.com/v2/files/meta/description

Use this API method to check the meta description of a file or folder.

For images, this is the meta field that is used for showing alt tags on images.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/description?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"description": "Blue Lake in the Winter"
}
GEThttps://api.sirv.com/v2/files/meta/title

Use this API method to check the meta title of a file or folder.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/title?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"title": "Blue Lake"
}
GEThttps://api.sirv.com/v2/files/meta/product

Use this API method to get the product meta fields for an image.

This can be used by retailers for organizing images into product groups for an ecommerce store.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/product?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"id": "LLBB77",
"name": "Blue Lake Card",
"brand": "BLUE LAKE LLC",
"category1": "Cards",
"category2": "Lakes"
}
GEThttps://api.sirv.com/v2/files/poi

Use this API method to get coordinates of all the POI (points of interest) on the image.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/poi?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"BlueLake": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5
}
}
POSThttps://api.sirv.com/v2/files/meta

Add multiple meta fields in a single request. Any of the 10 types of meta can be added or changed with this API method.

If you’re adding a lot of meta, this is the fastest and lowest load way to add meta data.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
tagsarray of stringNo["lake","water"]Tags of the file.
titlestringNoBlue LakeTitle of the file.
descriptionstringNoBlue Lake in the WinterDescription of the file.
productobjectNoProduct details of the file.
product.idstringNoLLBB77Product ID or SKU.
product.namestringNoBlue Lake CardProduct name.
product.brandstringNoBLUE LAKE LLCBrand of the product.
product.category1stringNoCardsMain product category.
product.category2stringNoLakesSecond product category.
approvalobjectNoApproval status of the file.
approval.approvedbooleanYesfalsetrue to approve the file, false to reject it.
approval.commentstringYesIt looks too cold!A note on the decision.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"tags": [
"lake",
"water"
],
"title": "Blue Lake",
"description": "Blue Lake in the Winter",
"product": {
"id": "LLBB77",
"name": "Blue Lake Card",
"brand": "BLUE LAKE LLC",
"category1": "Cards",
"category2": "Lakes"
},
"approval": {
"approved": false,
"comment": "It looks too cold!"
}
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

POSThttps://api.sirv.com/v2/files/meta/approval

Use this API method to set the file approval tag (approved or not) and an optional comment.

Used as part of an image review and approval process.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
approvedbooleanYesfalsetrue to approve the file, false to reject it.
commentstringYesIt looks too cold!A note on the decision.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/approval?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"approved": false,
"comment": "It looks too cold!"
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

POSThttps://api.sirv.com/v2/files/meta/description

Use this API method to set/change the meta description of a file or folder.

For images, this is the meta field that is used for showing alt tags on images.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
descriptionstringYesBlue Lake in the WinterThe new description of the file.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/description?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"description": "Blue Lake in the Winter"
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

POSThttps://api.sirv.com/v2/files/meta/title

Use this API method to set the meta title of a file or folder.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
titlestringYesBlue LakeThe new title of the file.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/title?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"title": "Blue Lake"
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

POSThttps://api.sirv.com/v2/files/poi

Use this API method to set coordinates of the POI (point of interest) on the image.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
namestringNoBlueLakeName of the POI
xnumberNo0.5Relative X coordinate of the center of the POI. Up to 1.
ynumberNo0.5Relative Y coordinate of the center of the POI. Up to 1.
widthnumberNo0.5Relative width of the POI. Up to 1.
heightnumberNo0.5Relative height of the POI. Up to 1.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/poi?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"name": "BlueLake",
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

POSThttps://api.sirv.com/v2/files/meta/product

Use this API method to set product meta fields for an image.

This can be used by retailers for organizing images into product groups for an ecommerce store.

Query parameters

NameTypeRequiredExampleDescription
filenamestringYes/REST API Examples/blue-lake.jpgPath of the file in your account, starting with /.

Request body (JSON)

FieldTypeRequiredExampleDescription
idstringNoLLBB77Product ID or SKU.
namestringNoBlue Lake CardProduct name.
brandstringNoBLUE LAKE LLCBrand of the product.
category1stringNoCardsMain product category.
category2stringNoLakesSecond product category.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/meta/product?filename=%2FREST%20API%20Examples%2Fblue-lake.jpg', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"id": "LLBB77",
"name": "Blue Lake Card",
"brand": "BLUE LAKE LLC",
"category1": "Cards",
"category2": "Lakes"
}),
});
console.log(res.status, await res.text());

Response

HTTP 200 with an empty body when the command succeeds.

Back to top