Utility Pages
Endpoints for managing utility pages
Gets a utility page by specific ID.
await BitBadgesApi.getUtilityPage("utilityPage123", { ... });SDK Links:
Scopes:
manageUtilityPages- Required and must have view permissions for private listings
Utility listing ID
Success response
Bad Request - Invalid configuration or request
Internal Server Error
GET /api/v0/utilityPage/{utilityPageId} HTTP/1.1
Host: api.bitbadges.io
x-api-key: YOUR_API_KEY
Accept: */*
{
"listing": {
"_docId": "text",
"_id": "text",
"listingId": "text",
"type": "text",
"createdBy": "bb1...",
"managedBy": "bb1...",
"directLink": "text",
"createdAt": "1713301889",
"lastUpdated": "1713301889",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
},
"inheritMetadataFrom": {
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"badgeId": "text"
},
"content": [
{
"type": "text",
"label": "text",
"content": "text"
}
],
"links": [
{
"url": "text",
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
}
}
],
"displayTimes": {
"start": 1,
"end": 1
},
"visibility": "public",
"categories": [
"text"
],
"approvalStatus": {
"isApproved": true,
"isFeatured": true,
"featuredPriority": 1,
"rejected": true,
"reason": "text",
"updatedBy": "bb1..."
},
"viewCount": 1,
"estimatedCost": {
"amount": 1,
"denom": "text"
},
"estimatedTime": "text",
"viewsByPeriod": {
"hourly": 1,
"daily": 1,
"weekly": 1,
"monthly": 1
},
"linkedTo": {
"collectionId": "text",
"badgeIds": [
{
"start": "1",
"end": "10"
}
],
"listId": "customOrReservedListId"
},
"locale": "text",
"homePageView": {
"type": "badges",
"category": "text"
}
}
}Fetches utility pages based on the provided criteria.
Requires authentication for private listings.
await BitBadgesApi.getUtilityPages(...);SDK Links:
Scopes:
manageUtilityPages- Required for private listings
BitBadges API Key for authentication
The specific IDs to fetch
Success response
Bad Request - Invalid configuration or request
Internal Server Error
POST /api/v0/utilityPages/fetch HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23
{
"listingIds": [
"text"
]
}{
"docs": [
{
"_docId": "text",
"_id": "text",
"listingId": "text",
"type": "text",
"createdBy": "bb1...",
"managedBy": "bb1...",
"directLink": "text",
"createdAt": "1713301889",
"lastUpdated": "1713301889",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
},
"inheritMetadataFrom": {
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"badgeId": "text"
},
"content": [
{
"type": "text",
"label": "text",
"content": "text"
}
],
"links": [
{
"url": "text",
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
}
}
],
"displayTimes": {
"start": 1,
"end": 1
},
"visibility": "public",
"categories": [
"text"
],
"approvalStatus": {
"isApproved": true,
"isFeatured": true,
"featuredPriority": 1,
"rejected": true,
"reason": "text",
"updatedBy": "bb1..."
},
"viewCount": 1,
"estimatedCost": {
"amount": 1,
"denom": "text"
},
"estimatedTime": "text",
"viewsByPeriod": {
"hourly": 1,
"daily": 1,
"weekly": 1,
"monthly": 1
},
"linkedTo": {
"collectionId": "text",
"badgeIds": [
{
"start": "1",
"end": "10"
}
],
"listId": "customOrReservedListId"
},
"locale": "text",
"homePageView": {
"type": "badges",
"category": "text"
}
}
],
"pagination": {
"bookmark": "text",
"hasMore": true
}
}Searches for utility pages based on the provided criteria. Currently, this only gets the signed in user's utility pages.
await BitBadgesApi.searchUtilityPages(...);SDK Links:
Scopes:
manageUtilityPages- Required
The pagination bookmark to start from
BitBadges API Key for authentication
Success response
Bad Request - Invalid configuration or request
Internal Server Error
GET /api/v0/utilityPages/search HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Accept: */*
{
"docs": [
{
"_docId": "text",
"_id": "text",
"listingId": "text",
"type": "text",
"createdBy": "bb1...",
"managedBy": "bb1...",
"directLink": "text",
"createdAt": "1713301889",
"lastUpdated": "1713301889",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
},
"inheritMetadataFrom": {
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"badgeId": "text"
},
"content": [
{
"type": "text",
"label": "text",
"content": "text"
}
],
"links": [
{
"url": "text",
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
}
}
],
"displayTimes": {
"start": 1,
"end": 1
},
"visibility": "public",
"categories": [
"text"
],
"approvalStatus": {
"isApproved": true,
"isFeatured": true,
"featuredPriority": 1,
"rejected": true,
"reason": "text",
"updatedBy": "bb1..."
},
"viewCount": 1,
"estimatedCost": {
"amount": 1,
"denom": "text"
},
"estimatedTime": "text",
"viewsByPeriod": {
"hourly": 1,
"daily": 1,
"weekly": 1,
"monthly": 1
},
"linkedTo": {
"collectionId": "text",
"badgeIds": [
{
"start": "1",
"end": "10"
}
],
"listId": "customOrReservedListId"
},
"locale": "text",
"homePageView": {
"type": "badges",
"category": "text"
}
}
],
"pagination": {
"bookmark": "text",
"hasMore": true
}
}Creates a new utility page. This is also available in the developer portal.
await BitBadgesApi.createUtilityPage(...);SDK Links:
Scopes:
manageUtilityPages- Required
BitBadges API Key for authentication
The type of the listing
The visibility of the listing
The direct link for the listing. If specified, we will skip the entire content / listing page. Thus, content and links should be empty [].
The categories of the listing
Locale (ex: es, fr, etc.). If not specified, we assume en.
The estimated time to complete or deliver this utility/service
Success response
Bad Request - Invalid configuration or request
Internal Server Error
POST /api/v0/utilityPages HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1693
{
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
]
},
"content": [
{
"type": "text",
"label": "text",
"content": "text"
}
],
"links": [
{
"url": "text",
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
}
}
],
"type": "text",
"visibility": "public",
"displayTimes": {
"start": 1,
"end": 1
},
"directLink": "text",
"categories": [
"text"
],
"linkedTo": {
"collectionId": "text",
"badgeIds": [
{
"start": "1",
"end": "10"
}
],
"listId": "customOrReservedListId"
},
"inheritMetadataFrom": {
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"badgeId": "text"
},
"locale": "text",
"estimatedCost": {
"amount": 1,
"denom": "text"
},
"estimatedTime": "text"
}{
"doc": {
"_docId": "text",
"_id": "text",
"listingId": "text",
"type": "text",
"createdBy": "bb1...",
"managedBy": "bb1...",
"directLink": "text",
"createdAt": "1713301889",
"lastUpdated": "1713301889",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
},
"inheritMetadataFrom": {
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"badgeId": "text"
},
"content": [
{
"type": "text",
"label": "text",
"content": "text"
}
],
"links": [
{
"url": "text",
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
}
}
],
"displayTimes": {
"start": 1,
"end": 1
},
"visibility": "public",
"categories": [
"text"
],
"approvalStatus": {
"isApproved": true,
"isFeatured": true,
"featuredPriority": 1,
"rejected": true,
"reason": "text",
"updatedBy": "bb1..."
},
"viewCount": 1,
"estimatedCost": {
"amount": 1,
"denom": "text"
},
"estimatedTime": "text",
"viewsByPeriod": {
"hourly": 1,
"daily": 1,
"weekly": 1,
"monthly": 1
},
"linkedTo": {
"collectionId": "text",
"badgeIds": [
{
"start": "1",
"end": "10"
}
],
"listId": "customOrReservedListId"
},
"locale": "text",
"homePageView": {
"type": "badges",
"category": "text"
}
}
}Updates an existing utility page. This is also available in the developer portal.
await BitBadgesApi.updateUtilityPage(...);SDK Links:
Scopes:
manageUtilityPages- Required
BitBadges API Key for authentication
The listing ID to update
The visibility of the listing
The direct link for the listing. If specified, we will skip the entire content / listing page. Thus, content and links should be empty [].
This is incompatible with inherited metadata.
The categories of the listing
Locale (ex: es, fr, etc.). If not specified, we assume "en" (English).
The estimated time to complete or deliver this utility/service
Success response
Bad Request - Invalid configuration or request
Internal Server Error
PUT /api/v0/utilityPages HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1698
{
"listingId": "text",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
]
},
"content": [
{
"type": "text",
"label": "text",
"content": "text"
}
],
"links": [
{
"url": "text",
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
}
}
],
"visibility": "public",
"displayTimes": {
"start": 1,
"end": 1
},
"directLink": "text",
"categories": [
"text"
],
"linkedTo": {
"collectionId": "text",
"badgeIds": [
{
"start": "1",
"end": "10"
}
],
"listId": "customOrReservedListId"
},
"inheritMetadataFrom": {
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"badgeId": "text"
},
"locale": "text",
"estimatedCost": {
"amount": 1,
"denom": "text"
},
"estimatedTime": "text"
}{
"doc": {
"_docId": "text",
"_id": "text",
"listingId": "text",
"type": "text",
"createdBy": "bb1...",
"managedBy": "bb1...",
"directLink": "text",
"createdAt": "1713301889",
"lastUpdated": "1713301889",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
},
"inheritMetadataFrom": {
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"badgeId": "text"
},
"content": [
{
"type": "text",
"label": "text",
"content": "text"
}
],
"links": [
{
"url": "text",
"claimId": "text",
"applicationId": "text",
"collectionId": "text",
"listId": "customOrReservedListId",
"mapId": "text",
"metadata": {
"name": "Name",
"description": "Brief description.",
"image": "https://example.com/image.png",
"bannerImage": "https://example.com",
"category": "text",
"externalUrl": "text",
"tags": [
"text"
],
"socials": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"offChainTransferabilityInfo": {
"host": "text",
"assignMethod": "text"
},
"attributes": [
{
"type": "text",
"name": "Name",
"value": "text"
}
],
"additionalInfo": [
{
"name": "Name",
"image": "https://example.com/image.png",
"description": "Brief description.",
"url": "text"
}
],
"fetchedAtBlock": 1,
"fetchedAt": "1713301889",
"_isUpdating": true
}
}
],
"displayTimes": {
"start": 1,
"end": 1
},
"visibility": "public",
"categories": [
"text"
],
"approvalStatus": {
"isApproved": true,
"isFeatured": true,
"featuredPriority": 1,
"rejected": true,
"reason": "text",
"updatedBy": "bb1..."
},
"viewCount": 1,
"estimatedCost": {
"amount": 1,
"denom": "text"
},
"estimatedTime": "text",
"viewsByPeriod": {
"hourly": 1,
"daily": 1,
"weekly": 1,
"monthly": 1
},
"linkedTo": {
"collectionId": "text",
"badgeIds": [
{
"start": "1",
"end": "10"
}
],
"listId": "customOrReservedListId"
},
"locale": "text",
"homePageView": {
"type": "badges",
"category": "text"
}
}
}Deletes a utility page. This is also available in the developer portal.
await BitBadgesApi.deleteUtilityPage(...);SDK Links:
Scopes:
manageUtilityPages- Required
BitBadges API Key for authentication
The listing ID to delete
Success response
Bad Request - Invalid configuration or request
Internal Server Error
DELETE /api/v0/utilityPages HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"listingId": "text"
}{}Last updated