> For the complete documentation index, see [llms.txt](https://elacitylabs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elacitylabs.gitbook.io/docs/api/reference/collections.md).

# Collections

NFT collection management

## POST /collection/collectiondetails

> Create or register a new collection

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/collection/collectiondetails":{"post":{"tags":["Collections"],"summary":"Create or register a new collection","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["erc721Address","collectionName"],"properties":{"erc721Address":{"$ref":"#/components/schemas/Address"},"collectionName":{"type":"string"},"description":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"logoImageHash":{"type":"string"},"coverImageHash":{"type":"string"},"siteUrl":{"type":"string"},"discord":{"type":"string"},"twitterHandle":{"type":"string"},"instagramHandle":{"type":"string"},"mediumHandle":{"type":"string"},"telegram":{"type":"string"}}}}}},"responses":{"200":{"description":"Collection created"}}}}}}
```

## POST /collection/search

> Search collections

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/collection/search":{"post":{"tags":["Collections"],"summary":"Search collections","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"}}}}}},"responses":{"200":{"description":"Collection search results"}}}}}}
```

## POST /collection/getMintableCollections

> Get collections the user can mint to

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/collection/getMintableCollections":{"post":{"tags":["Collections"],"summary":"Get collections the user can mint to","responses":{"200":{"description":"Mintable collections list"}}}}}}
```

## POST /collection/getReviewApplications

> Get pending collection review applications

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"},{"name":"Admin","description":"Administrative operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/collection/getReviewApplications":{"post":{"tags":["Collections","Admin"],"summary":"Get pending collection review applications","responses":{"200":{"description":"Review applications"}}}}}}
```

## POST /collection/reviewApplication

> Approve or reject a collection application

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"},{"name":"Admin","description":"Administrative operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/collection/reviewApplication":{"post":{"tags":["Collections","Admin"],"summary":"Approve or reject a collection application","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Application reviewed"}}}}}}
```

## POST /collection/{collectionAddress}/update

> Update collection details

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/collection/{collectionAddress}/update":{"post":{"tags":["Collections"],"summary":"Update collection details","parameters":[{"name":"collectionAddress","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Collection updated"}}}}}}
```

## POST /collection/searchCollection

> Search for a single collection

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/collection/searchCollection":{"post":{"tags":["Collections"],"summary":"Search for a single collection","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"erc721Address":{"$ref":"#/components/schemas/Address"}}}}}},"responses":{"200":{"description":"Collection found"}}}}}}
```

## GET /collection/fetchAllCollections

> Fetch all collections

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/collection/fetchAllCollections":{"get":{"tags":["Collections"],"summary":"Fetch all collections","responses":{"200":{"description":"All collections"}}}}}}
```

## POST /collection/getCollectionInfo

> Get collection info by address

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/collection/getCollectionInfo":{"post":{"tags":["Collections"],"summary":"Get collection info by address","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contractAddress"],"properties":{"contractAddress":{"$ref":"#/components/schemas/Address"}}}}}},"responses":{"200":{"description":"Collection info","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"$ref":"#/components/schemas/Collection"}}}}}}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"Collection":{"type":"object","properties":{"erc721Address":{"$ref":"#/components/schemas/Address"},"collectionName":{"type":"string"},"description":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"logoImageHash":{"type":"string"},"coverImageHash":{"type":"string"},"siteUrl":{"type":"string"},"discord":{"type":"string"},"twitterHandle":{"type":"string"},"instagramHandle":{"type":"string"},"mediumHandle":{"type":"string"},"telegram":{"type":"string"},"owner":{"$ref":"#/components/schemas/Address"},"isVerified":{"type":"boolean"},"isVisible":{"type":"boolean"},"status":{"type":"boolean"}}}}}}
```

## POST /collection/isValidated

> Check if a collection is verified

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/collection/isValidated":{"post":{"tags":["Collections"],"summary":"Check if a collection is verified","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contractAddress"],"properties":{"contractAddress":{"$ref":"#/components/schemas/Address"}}}}}},"responses":{"200":{"description":"Validation status"}}}}}}
```

## POST /collection/volumes

> Get collection volume statistics

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/collection/volumes":{"post":{"tags":["Collections"],"summary":"Get collection volume statistics","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Volume stats"}}}}}}
```

## POST /collection/stats

> Get collection stats

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/collection/stats":{"post":{"tags":["Collections"],"summary":"Get collection stats","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Collection stats"}}}}}}
```

## POST /collection/{address}/manage

> Manage collection (e.g. refresh metadata)

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/collection/{address}/manage":{"post":{"tags":["Collections"],"summary":"Manage collection (e.g. refresh metadata)","parameters":[{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Management action performed"}}}}}}
```

## GET /collection/{address}/stats

> Get stats for a specific collection

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/collection/{address}/stats":{"get":{"tags":["Collections"],"summary":"Get stats for a specific collection","parameters":[{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}],"responses":{"200":{"description":"Collection stats"}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## POST /collection/{address}/activities

> Get activities for a collection

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Collections","description":"NFT collection management"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/collection/{address}/activities":{"post":{"tags":["Collections"],"summary":"Get activities for a collection","parameters":[{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"integer"},"count":{"type":"integer"}}}}}},"responses":{"200":{"description":"Collection activities"}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```
