{ "openapi": "3.1.0", "paths": { "/v1/publications/{publicationId}": { "get": { "description": "Retrieve detailed information about a specific publication", "summary": "Get publication by ID", "tags": [ "publications" ], "parameters": [ { "name": "publicationId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Unique identifier of the publication" } ], "responses": { "200": { "description": "Publication details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the publication" }, "name": { "type": "string", "description": "Display name of the publication" }, "ownerUserId": { "type": "string", "description": "ID of the user who owns this publication" }, "slug": { "type": "string", "minLength": 1, "maxLength": 256, "description": "URL-friendly identifier for the publication; accessible at paragraph.com/@[slug]" }, "customDomain": { "type": "string", "format": "uri", "description": "Custom domain configured for this publication" }, "summary": { "type": "string", "maxLength": 500, "description": "Brief description of the publication (max 500 characters)" }, "logoUrl": { "type": "string", "format": "uri", "description": "URL to the publication's logo image" } }, "required": [ "id", "name", "ownerUserId", "slug" ], "description": "Publication details retrieved successfully" } } } }, "404": { "description": "Publication not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Publication not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getPublication", "x-codeSamples": [ { "lang": "typescript", "label": "Get publication by ID", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst publication = await api.getPublication(\"BMV6abfvCSUl51ErCVzd\")" } ] } }, "/v1/publications/slug/{slug}": { "get": { "description": "Retrieve publication details using its URL-friendly slug. Optionally include an @ before the slug.", "summary": "Get publication by slug", "tags": [ "publications" ], "parameters": [ { "name": "slug", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": "URL-friendly identifier of the publication" } ], "responses": { "200": { "description": "Publication details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the publication" }, "name": { "type": "string", "description": "Display name of the publication" }, "ownerUserId": { "type": "string", "description": "ID of the user who owns this publication" }, "slug": { "type": "string", "minLength": 1, "maxLength": 256, "description": "URL-friendly identifier for the publication; accessible at paragraph.com/@[slug]" }, "customDomain": { "type": "string", "format": "uri", "description": "Custom domain configured for this publication" }, "summary": { "type": "string", "maxLength": 500, "description": "Brief description of the publication (max 500 characters)" }, "logoUrl": { "type": "string", "format": "uri", "description": "URL to the publication's logo image" } }, "required": [ "id", "name", "ownerUserId", "slug" ], "description": "Publication details retrieved successfully" } } } }, "404": { "description": "Publication not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Publication not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getPublicationBySlug", "x-codeSamples": [ { "lang": "typescript", "label": "Get publication by slug", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst publication = await api.getPublicationBySlug(\"blog\")" } ] } }, "/v1/publications/domain/{domain}": { "get": { "description": "Retrieve publication details using its custom domain", "summary": "Get publication by custom domain", "tags": [ "publications" ], "parameters": [ { "name": "domain", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Custom domain of the publication" } ], "responses": { "200": { "description": "Publication details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the publication" }, "name": { "type": "string", "description": "Display name of the publication" }, "ownerUserId": { "type": "string", "description": "ID of the user who owns this publication" }, "slug": { "type": "string", "minLength": 1, "maxLength": 256, "description": "URL-friendly identifier for the publication; accessible at paragraph.com/@[slug]" }, "customDomain": { "type": "string", "format": "uri", "description": "Custom domain configured for this publication" }, "summary": { "type": "string", "maxLength": 500, "description": "Brief description of the publication (max 500 characters)" }, "logoUrl": { "type": "string", "format": "uri", "description": "URL to the publication's logo image" } }, "required": [ "id", "name", "ownerUserId", "slug" ], "description": "Publication details retrieved successfully" } } } }, "404": { "description": "Publication not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Publication not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getPublicationByDomain", "x-codeSamples": [ { "lang": "typescript", "label": "Get publication by domain", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst publication = await api.getPublicationByDomain(\"avc.xyz\")" } ] } }, "/v1/publications/{publicationId}/subscribers/count": { "get": { "description": "Retrieve the total number of subscribers for a publication", "summary": "Get subscriber count", "tags": [ "publications" ], "parameters": [ { "name": "publicationId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Unique identifier of the publication" } ], "responses": { "200": { "description": "Subscriber count retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "number", "description": "Total number of subscribers" } }, "required": [ "count" ], "description": "Subscriber count retrieved successfully" } } } }, "404": { "description": "Publication not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Publication not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getSubscriberCount", "x-codeSamples": [ { "lang": "typescript", "label": "Get subscriber count", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst count = await api.getSubscriberCount(\"BMV6abfvCSUl51ErCVzd\")" } ] } }, "/v1/publications/{publicationId}/posts": { "get": { "description": "Retrieve a paginated list of posts from a publication", "summary": "List posts in a publication", "tags": [ "posts" ], "parameters": [ { "name": "publicationId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Unique identifier of the publication" }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of items to return (1-100, default: 10)", "schema": { "default": 10, "type": "integer", "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "Posts retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the post" }, "title": { "type": "string", "maxLength": 200, "description": "Title of the post" }, "imageUrl": { "type": "string", "format": "uri", "description": "Optional URL to the post's main image" }, "publishedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the post was published" }, "updatedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the post was last updated" }, "subtitle": { "type": "string", "maxLength": 300, "description": "Optional subtitle or brief summary" }, "slug": { "type": "string", "minLength": 1, "maxLength": 256, "description": "URL-friendly identifier for the post; accessible at paragraph.com/@[publicationSlug]/[slug]" }, "staticHtml": { "type": "string", "description": "Rendered HTML content of the post" }, "json": { "type": "string", "description": "TipTap JSON representation of the post content structure. This is the source of truth that the staticHtml and markdown is generated from" }, "markdown": { "type": "string", "description": "Markdown source of the post content" }, "coinId": { "type": "string", "description": "ID of the associated coin, if the post is coined" } }, "required": [ "id", "title", "slug", "staticHtml", "json", "markdown" ] }, "description": "Array of items in this page" }, "pagination": { "type": "object", "properties": { "cursor": { "type": "string", "description": "Cursor for fetching the next page of results" }, "hasMore": { "type": "boolean", "description": "Whether more results are available" }, "total": { "type": "number", "description": "Total number of items available" } }, "required": [ "hasMore" ] } }, "required": [ "items", "pagination" ], "description": "Posts retrieved successfully" } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Invalid request parameters" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getPosts", "x-codeSamples": [ { "lang": "typescript", "label": "List posts with pagination", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst posts = await api.getPosts(\"BMV6abfvCSUl51ErCVzd\", {\n limit: 20,\n cursor: \"next-cursor\"\n})" } ] } }, "/v1/posts/{postId}": { "get": { "description": "Retrieve detailed information about a specific post", "summary": "Get post by ID", "tags": [ "posts" ], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Unique identifier of the post" } ], "responses": { "200": { "description": "Post details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the post" }, "title": { "type": "string", "maxLength": 200, "description": "Title of the post" }, "imageUrl": { "type": "string", "format": "uri", "description": "Optional URL to the post's main image" }, "publishedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the post was published" }, "updatedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the post was last updated" }, "subtitle": { "type": "string", "maxLength": 300, "description": "Optional subtitle or brief summary" }, "slug": { "type": "string", "minLength": 1, "maxLength": 256, "description": "URL-friendly identifier for the post; accessible at paragraph.com/@[publicationSlug]/[slug]" }, "staticHtml": { "type": "string", "description": "Rendered HTML content of the post" }, "json": { "type": "string", "description": "TipTap JSON representation of the post content structure. This is the source of truth that the staticHtml and markdown is generated from" }, "markdown": { "type": "string", "description": "Markdown source of the post content" }, "coinId": { "type": "string", "description": "ID of the associated coin, if the post is coined" } }, "required": [ "id", "title", "slug", "staticHtml", "json", "markdown" ], "description": "Post details retrieved successfully" } } } }, "404": { "description": "Post not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Post not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getPost", "x-codeSamples": [ { "lang": "typescript", "label": "Get post by ID", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst post = await api.getPost(\"3T2PQZlsdQtigUp4fhlb\")" } ] } }, "/v1/publications/{publicationId}/posts/slug/{slug}": { "get": { "description": "Retrieve a post using its publication ID and slug", "summary": "Get post by slug", "tags": [ "posts" ], "parameters": [ { "name": "publicationId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Unique identifier of the publication" }, { "name": "slug", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": "URL-friendly identifier of the post" } ], "responses": { "200": { "description": "Post details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the post" }, "title": { "type": "string", "maxLength": 200, "description": "Title of the post" }, "imageUrl": { "type": "string", "format": "uri", "description": "Optional URL to the post's main image" }, "publishedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the post was published" }, "updatedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the post was last updated" }, "subtitle": { "type": "string", "maxLength": 300, "description": "Optional subtitle or brief summary" }, "slug": { "type": "string", "minLength": 1, "maxLength": 256, "description": "URL-friendly identifier for the post; accessible at paragraph.com/@[publicationSlug]/[slug]" }, "staticHtml": { "type": "string", "description": "Rendered HTML content of the post" }, "json": { "type": "string", "description": "TipTap JSON representation of the post content structure. This is the source of truth that the staticHtml and markdown is generated from" }, "markdown": { "type": "string", "description": "Markdown source of the post content" }, "coinId": { "type": "string", "description": "ID of the associated coin, if the post is coined" } }, "required": [ "id", "title", "slug", "staticHtml", "json", "markdown" ], "description": "Post details retrieved successfully" } } } }, "404": { "description": "Post not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Post not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getPostBySlug", "x-codeSamples": [ { "lang": "typescript", "label": "Get post by slug", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst post = await api.getPostBySlug(\"BMV6abfvCSUl51ErCVzd\", \"coins\")" } ] } }, "/v1/users/{userId}": { "get": { "description": "Retrieve detailed information about a specific user", "summary": "Get user by ID", "tags": [ "users" ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Unique identifier of the user" } ], "responses": { "200": { "description": "User details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the user" }, "walletAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Wallet address of the user" }, "avatarUrl": { "type": "string", "format": "uri", "description": "URL to the user's avatar image" }, "publicationId": { "type": "string", "description": "ID of the publication this user belongs to" }, "name": { "type": "string", "description": "Display name of the user" }, "bio": { "type": "string", "maxLength": 500, "description": "Brief biography of the user (max 500 characters)" } }, "required": [ "id", "publicationId" ], "description": "User details retrieved successfully" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "User not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getUser", "x-codeSamples": [ { "lang": "typescript", "label": "Get user by ID", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst user = await api.getUser(\"AeAOtR8TqKWyzG5apA1R\")" } ] } }, "/v1/users/wallet/{walletAddress}": { "get": { "description": "Retrieve user details using their Ethereum wallet address", "summary": "Get user by wallet address", "tags": [ "users" ], "parameters": [ { "name": "walletAddress", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "description": "Ethereum wallet address" } ], "responses": { "200": { "description": "User details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the user" }, "walletAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Wallet address of the user" }, "avatarUrl": { "type": "string", "format": "uri", "description": "URL to the user's avatar image" }, "publicationId": { "type": "string", "description": "ID of the publication this user belongs to" }, "name": { "type": "string", "description": "Display name of the user" }, "bio": { "type": "string", "maxLength": 500, "description": "Brief biography of the user (max 500 characters)" } }, "required": [ "id", "publicationId" ], "description": "User details retrieved successfully" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "User not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getUserByWallet", "x-codeSamples": [ { "lang": "typescript", "label": "Get user by wallet address", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst user = await api.getUserByWallet(\"0xc9ddb5E37165827BBBFf15b582E232C06862C4E8\")" } ] } }, "/v1/coins/{id}": { "get": { "description": "Retrieve information about a tokenized post using its unique ID", "summary": "Get coin by ID", "tags": [ "coins" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Paragraph-internal unique identifier for the coin" } ], "responses": { "200": { "description": "Coin details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the coin" }, "contractAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Base contract address for the coin" }, "symbol": { "type": "string", "pattern": "^[A-Z0-9]{3,6}$", "description": "Token symbol" }, "postId": { "type": "string", "description": "ID of the post this token is associated with" } }, "required": [ "id", "contractAddress", "symbol", "postId" ], "description": "Coin details retrieved successfully" } } } }, "404": { "description": "Coin not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Coin not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getCoin", "x-codeSamples": [ { "lang": "typescript", "label": "Get coin by ID", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst coin = await api.getCoin(\"S2AlaNG5Hw0NdNptmLTw\")" } ] } }, "/v1/coins/contract/{contractAddress}": { "get": { "description": "Retrieve information about a tokenized post using its contract address", "summary": "Get coin by contract address", "tags": [ "coins" ], "parameters": [ { "name": "contractAddress", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "description": "Contract address" } ], "responses": { "200": { "description": "Coin details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the coin" }, "contractAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Base contract address for the coin" }, "symbol": { "type": "string", "pattern": "^[A-Z0-9]{3,6}$", "description": "Token symbol" }, "postId": { "type": "string", "description": "ID of the post this token is associated with" } }, "required": [ "id", "contractAddress", "symbol", "postId" ], "description": "Coin details retrieved successfully" } } } }, "404": { "description": "Coin not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Coin not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getCoinByContract", "x-codeSamples": [ { "lang": "typescript", "label": "Get coin by contract address", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst coin = await api.getCoinByContract(\"0xe9bb3166ff5f96381e257d509a801303b68e5d34\")" } ] } }, "/v1/coins/{id}/holders": { "get": { "description": "Retrieve a paginated list of holders for a coined post", "summary": "List coin holders by ID", "tags": [ "coins" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Unique ID of the coin" }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of items to return (1-100, default: 10)", "schema": { "default": 10, "type": "integer", "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "Holders retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "walletAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Wallet address of the holder" }, "userId": { "type": "string", "description": "Paragraph user ID if the holder is a registered user" }, "balance": { "type": "string", "pattern": "^[0-9]+$", "description": "Token balance held (in wei)" }, "avatarUrl": { "type": "string", "format": "uri", "description": "URL to the user's avatar image, if available" }, "supportedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when user first supported" } }, "required": [ "walletAddress", "balance", "supportedAt" ] }, "description": "Array of items in this page" }, "pagination": { "type": "object", "properties": { "cursor": { "type": "string", "description": "Cursor for fetching the next page of results" }, "hasMore": { "type": "boolean", "description": "Whether more results are available" }, "total": { "type": "number", "description": "Total number of items available" } }, "required": [ "hasMore" ] } }, "required": [ "items", "pagination" ], "description": "Holders retrieved successfully" } } } }, "404": { "description": "Coin not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Coin not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getCoinHoldersById", "x-codeSamples": [ { "lang": "typescript", "label": "List coin holders (with pagination)", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst holders = await api.getCoinHolders(\"S2AlaNG5Hw0NdNptmLTw\", {\n limit: 50,\n cursor: \"next-cursor\"\n})" } ] } }, "/v1/coins/contract/{contractAddress}/holders": { "get": { "description": "Retrieve a paginated list of holders for a tokenized post", "summary": "List coin holders by contract address", "tags": [ "coins" ], "parameters": [ { "name": "contractAddress", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "description": "Contract address" }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of items to return (1-100, default: 10)", "schema": { "default": 10, "type": "integer", "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "Holders retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "walletAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Wallet address of the holder" }, "userId": { "type": "string", "description": "Paragraph user ID if the holder is a registered user" }, "balance": { "type": "string", "pattern": "^[0-9]+$", "description": "Token balance held (in wei)" }, "avatarUrl": { "type": "string", "format": "uri", "description": "URL to the user's avatar image, if available" }, "supportedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when user first supported" } }, "required": [ "walletAddress", "balance", "supportedAt" ] }, "description": "Array of items in this page" }, "pagination": { "type": "object", "properties": { "cursor": { "type": "string", "description": "Cursor for fetching the next page of results" }, "hasMore": { "type": "boolean", "description": "Whether more results are available" }, "total": { "type": "number", "description": "Total number of items available" } }, "required": [ "hasMore" ] } }, "required": [ "items", "pagination" ], "description": "Holders retrieved successfully" } } } }, "404": { "description": "Coin not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Coin not found" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ], "description": "Always false for error responses" }, "msg": { "type": "string", "description": "Human-readable error message" }, "error": { "type": "string", "description": "Technical error details or error code" } }, "required": [ "success", "msg" ], "description": "Internal server error" } } } } }, "operationId": "getCoinHoldersByContract", "x-codeSamples": [ { "lang": "typescript", "label": "List coin holders (with pagination)", "source": "import { ParagraphAPI } from \"@paragraph_xyz/sdk\"\n\nconst api = new ParagraphAPI()\nconst holders = await api.getCoinHoldersByContract(\"0xe9bb3166ff5f96381e257d509a801303b68e5d34\", {\n limit: 50,\n cursor: \"next-cursor\"\n})" } ] } } }, "info": { "title": "Paragraph API", "version": "1.0.0", "description": "Public API for interacting with Paragraph publications, posts, users, and coined writing.\n\n## Rate Limiting\nAPI requests are rate-limited to ensure fair usage. Contact support@paragraph.com for higher limits.\n\n## Pagination\nList endpoints support cursor-based pagination using `cursor` and `limit` parameters.", "contact": { "name": "Paragraph Support", "email": "support@paragraph.com", "url": "https://paragraph.com/support" }, "license": { "name": "MIT", "url": "https://opensource.org/licenses/MIT" } }, "servers": [ { "url": "https://public.api.paragraph.com/api", "description": "Production server" } ], "tags": [ { "name": "publications", "description": "Operations related to publications" }, { "name": "posts", "description": "Operations related to posts and content" }, { "name": "users", "description": "Operations related to users and authors" }, { "name": "coins", "description": "Operations related to tokenized content" } ], "security": [ {} ], "components": {} }