Underdog Protocol
  • API Documentation
  • Quickstart
  • Guides
    • Postman
    • Endpoints
    • Authentication
    • Pagination
    • Errors
    • Webhooks
    • Architecture
  • Resources
    • Projects
      • Transferable Projects
      • Non-Transferable Projects
      • NFTs
        • List all NFTs
        • Search NFTs
        • Create an NFT
        • Retrieve an NFT
        • Update an NFT
        • Generate Claim Link
        • Revoke an NFT
        • Burn an NFT
      • Methods
        • List all Projects
        • Create a Project
        • Retrieve a Project
        • Update a Project
        • Retrieve Project Stats
    • NFTs
      • Retrieve an NFT
      • Generate Claim Transaction
    • Orgs
      • List all Orgs
    • Transactions
      • List all Transactions
      • Retrieve a Transaction
    • Webhooks
      • List all Webhooks
      • Create a Webhook
      • Delete a Webhook
    • V1
      • Collections
        • List all Collections
        • Create a Collection
        • Retrieve a Collection
      • NFTs
        • List all NFTs
        • Create an NFT
        • Retrieve an NFT
        • Update an NFT
      • Managed NFTs
        • Claim
        • Revoke
  • Examples
    • Zapier Integrations
      • Zapier + Viral Loops
      • Zapier + Github + OpenAI
      • Zapier + Github
      • Zapier + Mailchimp
      • Zapier + Shopify
      • Zapier + Calendly
      • Zapier + Hubspot
      • Zapier + Typeform
    • Underdog with Airtable
      • Create a Project
      • Create NFT on Form Submission
      • Send a Claim Link
      • Updating NFTs
    • Web3 Blog
    • Mint NFTs on iPhone
  • Use Cases
    • Solana Mobile
    • Parcl
Powered by GitBook
On this page
  1. Resources
  2. Projects
  3. Methods

Update a Project

PreviousRetrieve a ProjectNextRetrieve Project Stats

Last updated 2 years ago

Partial Update an Project

Example

curl --location --request PATCH 'https://dev.underdogprotocol.com/v2/projects/n/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
    "image": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/005.png"
}'
const axios = require('axios');
let data = JSON.stringify({
  "image": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/005.png"
});

let config = {
  method: 'patch',
  url: 'https://dev.underdogprotocol.com/v2/projects/n/1',
  headers: { 
    'Authorization': 'Bearer {token}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
Response
{
    "id": 1,
    "status": "confirmed",
    "mintAddress": "6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE",
    "name": "Underdogs",
    "description": "Pokemnon",
    "image": "https://underdog-test-bucket-dev.s3.amazonaws.com/6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE/image.png"
}

Update a Project

Example

curl --location --request PUT 'https://dev.underdogprotocol.com/v2/projects/n/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
    "image": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/005.png",
    "description": "Pokemnon"
}'
const axios = require('axios');
let data = JSON.stringify({
  "image": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/005.png",
  "description": "Pokemnon"
});

let config = {
  method: 'put',
  url: 'https://dev.underdogprotocol.com/v2/projects/n/1',
  headers: { 
    'Authorization': 'Bearer {token}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
Response
{
    "id": 1,
    "status": "confirmed",
    "mintAddress": "6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE",
    "name": "Underdogs",
    "description": "Pokemnon",
    "image": "https://underdog-test-bucket-dev.s3.amazonaws.com/6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE/image.png"
}

Update Name & Symbol

Update Project Name

Example

curl --location --request PUT 'https://dev.underdogprotocol.com/v2/projects/n/1/name' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Project"
}'
const axios = require('axios');
let data = JSON.stringify({
  "name": "Project"
});

let config = {
  method: 'put',
  url: 'https://dev.underdogprotocol.com/v2/projects/n/1/name',
  headers: { 
    'Authorization': 'Bearer {token}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
Response
{
    "transactionId": "b8bde20a-a689-4ce7-9199-b5e4ca08e1cc",
    "projectId": 1,
    "transferable": false,
    "mintAddress": "6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE"
}

Update Project Symbol

Example

curl --location --request PUT 'https://dev.underdogprotocol.com/v2/projects/n/1/symbol \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
    "symbol": "TEST"
}'
const axios = require('axios');
let data = JSON.stringify({
  "symbol": "TEST"
});

let config = {
  method: 'put',
  url: 'https://dev.underdogprotocol.com/v2/projects/n/1/symbol',
  headers: { 
    'Authorization': 'Bearer {token}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
Response
{
    "transactionId": "b8bde20a-a689-4ce7-9199-b5e4ca08e1cc",
    "projectId": 1,
    "transferable": false,
    "mintAddress": "6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE"
}
  • Partial Update an Project
  • PATCHPartial Update a Project
  • Example
  • Update a Project
  • PUTUpdate a Project
  • Example
  • Update Name & Symbol
  • Update Project Name
  • PUTUpdate Project Name
  • Update Project Symbol
  • PUTUpdate Project Symbol

Partial Update a Project

patch

This endpoint allows you to perform a partial update on a Project.

Authorizations
Path parameters
transferablestringRequired

Value must be either 't' for transferable or 'n' for non-transferable

projectIdintegerRequired
nftIdintegerRequired

NFT ID

Body
descriptionstringOptional

Description stored in the metadata

Example: This is my first NFT
imagestringOptional

Image URL for your NFT

Example: https://example.com/image.png
animationUrlstringOptional

Animation URL for your NFT

Example: https://example.com/animation.mp4
Responses
200
Returns an Updated Project
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
patch
PATCH /v2/projects/:transferable/:projectId HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 181

{
  "description": "This is my first NFT",
  "image": "https://example.com/image.png",
  "attributes": {
    "Points": "40000",
    "Nickname": "LeGoat"
  },
  "animationUrl": "https://example.com/animation.mp4"
}
{
  "name": "NFT #1",
  "symbol": "NFT",
  "description": "This is my first NFT",
  "image": "https://example.com/image.png",
  "animationUrl": "https://example.com/animation.mp4",
  "id": 1,
  "mintAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
  "transferable": true,
  "status": "text"
}

Update a Project

put

This endpoint allows you to perform an update on a Project.

Authorizations
Path parameters
transferablestringRequired

Value must be either 't' for transferable or 'n' for non-transferable

projectIdintegerRequired
Body
descriptionstringOptional

Description stored in the metadata

Example: This is my first NFT
imagestringRequired

Image URL for your NFT

Example: https://example.com/image.png
animationUrlstringOptional

Animation URL for your NFT

Example: https://example.com/animation.mp4
Responses
200
Returns an Updated Project
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
put
PUT /v2/projects/:transferable/:projectId HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 129

{
  "description": "This is my first NFT",
  "image": "https://example.com/image.png",
  "animationUrl": "https://example.com/animation.mp4"
}
{
  "name": "NFT #1",
  "symbol": "NFT",
  "description": "This is my first NFT",
  "image": "https://example.com/image.png",
  "animationUrl": "https://example.com/animation.mp4",
  "id": 1,
  "mintAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
  "transferable": true,
  "status": "text"
}

Update Project Name

put

This endpoint allows you to update the on-chain name for a Project.

Authorizations
Path parameters
transferablestringRequired

Value must be either 't' for transferable or 'n' for non-transferable

projectIdintegerRequired
Body
namestringRequired

Name stored as on-chain metadata

Example: NFT #1
Responses
202Success
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
put
PUT /v2/projects/:transferable/:projectId/name HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "name": "NFT #1"
}
{
  "transactionId": "text",
  "projectId": 1,
  "transferable": true,
  "mintAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp"
}

Update Project Symbol

put

This endpoint allows you to update the on-chain symbol for a Project.

Authorizations
Path parameters
transferablestringRequired

Value must be either 't' for transferable or 'n' for non-transferable

projectIdintegerRequired
Body
symbolstringOptional

Symbol stored as on-chain metadata

Example: NFT
Responses
202Success
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
put
PUT /v2/projects/:transferable/:projectId/symbol HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "symbol": "NFT"
}
{
  "transactionId": "text",
  "projectId": 1,
  "transferable": true,
  "mintAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp"
}