# Asset Packs

Asset pack management

## Get all asset packs

> Returns asset packs for the user or default packs

```json
{"openapi":"3.0.3","info":{"title":"Builder Server API","version":"2.10.0"},"tags":[{"name":"Asset Packs","description":"Asset pack management"}],"servers":[{"url":"https://builder-api.decentraland.org/v1","description":"Production environment","variables":{}},{"url":"https://builder-api.decentraland.zone/v1","description":"Development environment","variables":{}}],"security":[],"paths":{"/assetPacks":{"get":{"operationId":"getAssetPacks","tags":["Asset Packs"],"summary":"Get all asset packs","description":"Returns asset packs for the user or default packs","parameters":[{"name":"owner","in":"query","schema":{"type":"string","description":"Use \"default\" for default packs or user address"}}],"responses":{"200":{"description":"List of asset packs","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"thumbnail":{"type":"string"},"eth_address":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"asset_pack_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"model":{"type":"string"},"script":{"type":"string"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"contents":{"type":"object"},"metrics":{"type":"object"},"parameters":{"type":"array"},"actions":{"type":"array"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"Unauthorized - authentication required or insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}}}}}}}
```

## Get an asset pack

> Returns an asset pack by ID

```json
{"openapi":"3.0.3","info":{"title":"Builder Server API","version":"2.10.0"},"tags":[{"name":"Asset Packs","description":"Asset pack management"}],"servers":[{"url":"https://builder-api.decentraland.org/v1","description":"Production environment","variables":{}},{"url":"https://builder-api.decentraland.zone/v1","description":"Development environment","variables":{}}],"security":[],"paths":{"/assetPacks/{id}":{"get":{"operationId":"getAssetPack","tags":["Asset Packs"],"summary":"Get an asset pack","description":"Returns an asset pack by ID","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Asset pack details","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"thumbnail":{"type":"string"},"eth_address":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"asset_pack_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"model":{"type":"string"},"script":{"type":"string"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"contents":{"type":"object"},"metrics":{"type":"object"},"parameters":{"type":"array"},"actions":{"type":"array"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"401":{"description":"Unauthorized - authentication required or insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}}}}}}}
```

## Create or update an asset pack

> Creates a new asset pack or updates an existing one

```json
{"openapi":"3.0.3","info":{"title":"Builder Server API","version":"2.10.0"},"tags":[{"name":"Asset Packs","description":"Asset pack management"}],"servers":[{"url":"https://builder-api.decentraland.org/v1","description":"Production environment","variables":{}},{"url":"https://builder-api.decentraland.zone/v1","description":"Development environment","variables":{}}],"security":[{"SignedFetch":[]}],"components":{"securitySchemes":{"SignedFetch":{"type":"apiKey","in":"header","name":"X-Identity-Auth-Chain-*","description":"Signed fetch authentication using Decentraland's ADR-44 specification.\nMultiple headers are used to provide the authentication chain.\n"}}},"paths":{"/assetPacks/{id}":{"put":{"operationId":"upsertAssetPack","tags":["Asset Packs"],"summary":"Create or update an asset pack","description":"Creates a new asset pack or updates an existing one","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","title","assets"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"assets":{"type":"array","items":{"type":"object","required":["id","name","model"],"properties":{"id":{"type":"string","format":"uuid"},"asset_pack_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"model":{"type":"string"},"script":{"type":"string"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"contents":{"type":"object"},"metrics":{"type":"object"}}}}}}}}},"responses":{"200":{"description":"Asset pack created/updated successfully"},"400":{"description":"Bad request - invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}},"401":{"description":"Unauthorized - authentication required or insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}}}}}}}
```

## Delete an asset pack

> Deletes an asset pack

```json
{"openapi":"3.0.3","info":{"title":"Builder Server API","version":"2.10.0"},"tags":[{"name":"Asset Packs","description":"Asset pack management"}],"servers":[{"url":"https://builder-api.decentraland.org/v1","description":"Production environment","variables":{}},{"url":"https://builder-api.decentraland.zone/v1","description":"Development environment","variables":{}}],"security":[{"SignedFetch":[]}],"components":{"securitySchemes":{"SignedFetch":{"type":"apiKey","in":"header","name":"X-Identity-Auth-Chain-*","description":"Signed fetch authentication using Decentraland's ADR-44 specification.\nMultiple headers are used to provide the authentication chain.\n"}}},"paths":{"/assetPacks/{id}":{"delete":{"operationId":"deleteAssetPack","tags":["Asset Packs"],"summary":"Delete an asset pack","description":"Deletes an asset pack","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Asset pack deleted successfully"},"401":{"description":"Unauthorized - authentication required or insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}}}}}}}
```

## Upload asset pack thumbnail

> Uploads a thumbnail for an asset pack

```json
{"openapi":"3.0.3","info":{"title":"Builder Server API","version":"2.10.0"},"tags":[{"name":"Asset Packs","description":"Asset pack management"}],"servers":[{"url":"https://builder-api.decentraland.org/v1","description":"Production environment","variables":{}},{"url":"https://builder-api.decentraland.zone/v1","description":"Development environment","variables":{}}],"security":[{"SignedFetch":[]}],"components":{"securitySchemes":{"SignedFetch":{"type":"apiKey","in":"header","name":"X-Identity-Auth-Chain-*","description":"Signed fetch authentication using Decentraland's ADR-44 specification.\nMultiple headers are used to provide the authentication chain.\n"}}},"paths":{"/assetPacks/{id}/thumbnail":{"post":{"operationId":"uploadAssetPackThumbnail","tags":["Asset Packs"],"summary":"Upload asset pack thumbnail","description":"Uploads a thumbnail for an asset pack","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"thumbnail":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Thumbnail uploaded successfully"},"401":{"description":"Unauthorized - authentication required or insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object"}}}}}}}}}}}
```
