Skip to main content

v1/pinning REST API Endpoint

Ability to pin an existing CID

Updated on
Oct 19, 2023

v1/pinning REST API Endpoint

Body Parameters

cid
string
REQUIRED
Represents the CID (Content Identifier) that identifies the content to be pinned
name
string
REQUIRED
Specifies the name associated with the pinned object. The length should be less than or equal to 255 characters
origins
array
A list of multi-addresses representing the origins of the pinned object
meta
object
Contains details about the meta information of the pinned object
test
string
Represents a test-related detail about the pinned object
morevalue
object
Contains additional details about the pinned object
location
string
Describes the location associated with the pinned object

Returns

requestId
string
Represents the ID of the request
status
string
Describes the status of the pinned object
cid
string
Represents the CID associated with the pinned object
name
string
Specifies the name associated with the pinned object
origins
string
A list of string values representing the origins of the pinned object
meta
object
Contains details about the meta information of the pinned object
test
string
Represents a test-related detail about the pinned object
morevalue
object
Contains additional details about the pinned object
location
string
Describes the location associated with the pinned object
uuid
string
Represents the UUID (Universally Unique Identifier) of the pinned object
createdAt
string
Specifies the date and time when the pinned object was created
updatedAt
string
Indicates the date and time when the pinned object was last updated
contentType
null
Represents the content type of the pinned object
size
null
Represents the size of the pinned object
Request
1
curl --location 'https://api.quicknode.com/ipfs/rest/v1/pinning' \
2
--header 'x-api-key: YOUR_API_KEY' \
3
--header 'Content-Type: application/json' \
4
--data ' {
5
"cid": "QmWTqpfKyPJcGuWWg73beJJiL6FrCB5yX8qfcCF4bHanes",
6
"name": "image.png",
7
"origins": ["/ip4/123.12.113.142/tcp/4001/p2p/SourcePeerId", "/ip4/123.12.113.114/udp/4001/quic/p2p/SourcePeerId"],
8
"meta": { "test": "mycooltest", "morevalue": { "location": "/home" } }
9
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free