Skip to main content

Endpoints

Dev Resources endpoints allow you to create, read, update, and delete dev resources in Figma files.

GET dev resources

Get dev resources in a file.

info

HTTP endpoint

GET /v1/files/:file_key/dev_resources

Return value

{
"dev_resources": DevResource[]
}
Path parametersDescription
file_key
String
File to get dev resources from. This must be a main file key, not a branch key.
Query parametersDescription
node_ids
Stringoptional
Comma separated list of nodes that you care about in the document. If specified, only dev resources attached to these nodes will be returned. If not specified, all dev resources in the file will be returned.
Error codesDescription
400Invalid parameter. The message parameter on the response will describe the error.
401Issue with authentication. The message parameter on the response will describe the error.

POST dev resources

Bulk create dev resources across multiple files.

Dev resources that are successfully created will show up in the links_created array in the response.

If there are any dev resources that cannot be created, you may still get a 200 response. These resources will show up in the errors array. Some reasons a dev resource cannot be created include:

  • Resource points to a file_key that cannot be found.
  • The node already has the maximum of 10 dev resources.
  • Another dev resource for the node has the same url.
info

HTTP endpoint

POST /v1/dev_resources

Return value

{
"links_created": DevResource[]
"errors": [
{
"file_key": String | null,
"node_id": String | null,
"error": String,
},
...
]
}
Body parametersDescription
dev_resources
DevResourceCreate[]required
A list of dev resources that you want to create.
Error codesDescription
400Invalid parameter. The message parameter on the response will describe the error.
401Issue with authentication. The message parameter on the response will describe the error.

PUT dev resources

Bulk update dev resources across multiple files.

Ids for dev resources that are successfully updated will show up in the links_updated array in the response.

If there are any dev resources that cannot be updated, you may still get a 200 response. These resources will show up in the errors array.

info

HTTP endpoint

PUT /v1/dev_resources

Return value

{
"links_updated": String[]
"errors": [
{
"id": String,
"error": String,
},
...
]
}
Body parametersDescription
dev_resources
DevResourceUpdate[]required
A list of dev resources that you want to update.
Error codesDescription
400Invalid parameter. The message parameter on the response will describe the error.
401Issue with authentication. The message parameter on the response will describe the error.

DELETE dev resources

Delete a dev resources from a file.

info

HTTP endpoint

DELETE /v1/files/:file_key/dev_resources/:dev_resource_id

Return value

Nothing is returned from this endpoint

Path parametersDescription
file_key
String
File to delete dev resource from.
dev_resource_id
String
Dev resource id to delete.
Error codesDescription
401Issue with authentication. The message parameter on the response will describe the error.
404The specified dev resource / file was not found