Skip to main content
POST
/
community
/
{id}
/
badge
Create badge
curl --request POST \
  --url https://api.op.xyz/v1/community/{id}/badge \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "status": "live",
  "title": "<string>",
  "image": "<string>",
  "type": "achievement",
  "description": "<string>",
  "chainId": "11155111",
  "contract": "<string>",
  "claimEndDate": "2023-11-07T05:31:56Z",
  "maxClaims": 123,
  "tags": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "author": {
    "name": "<string>",
    "uri": "<string>"
  }
}'

Authorizations

X-Api-Key
string
header
required

Path Parameters

id
string
required

Community ID

Body

application/json
title
string
required
image
string
required

The image URL of the badge. Can be an IPFS url or OpenPage File.

type
enum<string>
required
Available options:
achievement,
attendance
description
string
required
claimEndDate
string<date-time>
required
maxClaims
number
required
tags
object[]
required

Array of tags. Members with matching tags are eligible to claim the badge.

author
object
required
status
enum<string>
Available options:
draft,
under_review,
approved,
rejected,
live
Example:

"live"

chainId
string

The chain ID of the badge.

Example:

"11155111"

contract
string