Skip to main content
POST
/
v3
/
designs
/
{editorId}
/
artifacts
/
{artifactId}
/
files
/
read
Read artifact files
curl --request POST \
  --url https://api.magicpatterns.com/api/v3/designs/{editorId}/artifacts/{artifactId}/files/read \
  --header 'Content-Type: application/json' \
  --header 'x-mp-api-key: <api-key>' \
  --data '
{
  "fileNames": [
    "App.tsx",
    "index.css"
  ]
}
'
{
  "files": [
    {
      "name": "App.tsx",
      "content": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://magicpatterns.mintlify.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-mp-api-key
string
header
required

Magic Patterns API key. The same key authenticates v3 REST and the MCP server. Create one at https://www.magicpatterns.com/settings/api-keys.

Path Parameters

editorId
string
required

The design's editor ID.

Example:

"abc123"

artifactId
string
required

The artifact ID.

Body

application/json
fileNames
string[]
required

The file names to read.

Example:
["App.tsx", "index.css"]

Response

Requested files.

files
object[]