Update a collection
curl --request PATCH \
--url https://api2.endstate.io/v1/collections/{collection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect_url": "https://brand.example/p"
}
'import requests
url = "https://api2.endstate.io/v1/collections/{collection_id}"
payload = { "redirect_url": "https://brand.example/p" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({redirect_url: 'https://brand.example/p'})
};
fetch('https://api2.endstate.io/v1/collections/{collection_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api2.endstate.io/v1/collections/{collection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'redirect_url' => 'https://brand.example/p'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api2.endstate.io/v1/collections/{collection_id}"
payload := strings.NewReader("{\n \"redirect_url\": \"https://brand.example/p\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api2.endstate.io/v1/collections/{collection_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_url\": \"https://brand.example/p\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.endstate.io/v1/collections/{collection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect_url\": \"https://brand.example/p\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8e1a7f50-90ab-4cde-8012-3456789abcde",
"contract": {
"address": "0x1111111111111111111111111111111111111111",
"chain_id": 84532,
"status": "active"
},
"name": "Example Collection",
"external_id": "collection-001",
"redirect_url": "https://brand.example/p"
}collections
Update a collection
Updates a collection’s tap redirect URL. Send null to clear.
PATCH
/
v1
/
collections
/
{collection_id}
Update a collection
curl --request PATCH \
--url https://api2.endstate.io/v1/collections/{collection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect_url": "https://brand.example/p"
}
'import requests
url = "https://api2.endstate.io/v1/collections/{collection_id}"
payload = { "redirect_url": "https://brand.example/p" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({redirect_url: 'https://brand.example/p'})
};
fetch('https://api2.endstate.io/v1/collections/{collection_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api2.endstate.io/v1/collections/{collection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'redirect_url' => 'https://brand.example/p'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api2.endstate.io/v1/collections/{collection_id}"
payload := strings.NewReader("{\n \"redirect_url\": \"https://brand.example/p\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api2.endstate.io/v1/collections/{collection_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_url\": \"https://brand.example/p\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.endstate.io/v1/collections/{collection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect_url\": \"https://brand.example/p\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8e1a7f50-90ab-4cde-8012-3456789abcde",
"contract": {
"address": "0x1111111111111111111111111111111111111111",
"chain_id": 84532,
"status": "active"
},
"name": "Example Collection",
"external_id": "collection-001",
"redirect_url": "https://brand.example/p"
}Authorizations
Use Authorization: Bearer end_sk_* for partner API keys (e.g. end_sk_AbCd_example_api_key).
Path Parameters
Collection id.
Example:
"8e1a7f50-90ab-4cde-8012-3456789abcde"
Body
application/json
Tap redirect URL for this collection's units. Send null to clear.
Example:
"https://brand.example/p"
Response
200 - application/json
The updated collection.
Show child attributes
Show child attributes
URL a tap on this collection's units redirects to. Unit- and product-level redirects take precedence over this value.
Example:
"https://brand.example/p"
⌘I

