Skip to main content
PATCH
/
admin
/
v1
/
networks
/
{network_id}
/
badges
/
{id}
/
Update a badge
curl --request PATCH \
  --url https://api.mn.co/admin/v1/networks/{network_id}/badges/{id}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "Top Contributor",
  "description": "Awarded to active community members",
  "color": "#FF5733",
  "avatar_id": 12345
}
'
import requests

url = "https://api.mn.co/admin/v1/networks/{network_id}/badges/{id}/"

payload = {
"title": "Top Contributor",
"description": "Awarded to active community members",
"color": "#FF5733",
"avatar_id": 12345
}
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({
title: 'Top Contributor',
description: 'Awarded to active community members',
color: '#FF5733',
avatar_id: 12345
})
};

fetch('https://api.mn.co/admin/v1/networks/{network_id}/badges/{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://api.mn.co/admin/v1/networks/{network_id}/badges/{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([
'title' => 'Top Contributor',
'description' => 'Awarded to active community members',
'color' => '#FF5733',
'avatar_id' => 12345
]),
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://api.mn.co/admin/v1/networks/{network_id}/badges/{id}/"

payload := strings.NewReader("{\n \"title\": \"Top Contributor\",\n \"description\": \"Awarded to active community members\",\n \"color\": \"#FF5733\",\n \"avatar_id\": 12345\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://api.mn.co/admin/v1/networks/{network_id}/badges/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Top Contributor\",\n \"description\": \"Awarded to active community members\",\n \"color\": \"#FF5733\",\n \"avatar_id\": 12345\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mn.co/admin/v1/networks/{network_id}/badges/{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 \"title\": \"Top Contributor\",\n \"description\": \"Awarded to active community members\",\n \"color\": \"#FF5733\",\n \"avatar_id\": 12345\n}"

response = http.request(request)
puts response.read_body
{
  "id": "1234",
  "created_at": "2026-07-09T23:52:13+00:00",
  "updated_at": "2026-07-09T23:52:13+00:00",
  "title": "Top Contributor",
  "custom_field_id": 123,
  "description": "Awarded for exceptional contributions",
  "color": "#FFD700",
  "avatar_url": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer<uint64>
required

ID of the badge

network_id
required

The Network's unique integer ID, or subdomain Unique numeric network ID

Body

application/json

Submit results as JSON

Request to update a badge

title
string

The title of the badge

Example:

"Top Contributor"

description
string

The description of the badge

Example:

"Awarded to active community members"

color
string

The hex color code for the badge

Example:

"#FF5733"

avatar_id
integer<uint64>

The ID of the asset to use as the badge image

Example:

12345

Response

The updated badge object

Badges are custom field values used to recognize and reward members

id
integer<uint64>
required

The record's integer ID

Example:

"1234"

created_at
string<date-time>
required

The date and time the record was created

Example:

"2026-07-09T23:52:13+00:00"

updated_at
string<date-time>
required

The date and time the record was last modified

Example:

"2026-07-09T23:52:13+00:00"

title
string
required

The title of the badge

Example:

"Top Contributor"

custom_field_id
integer<uint64>
required

The ID of the custom field this badge belongs to

description
string

The description of the badge

Example:

"Awarded for exceptional contributions"

color
string

The hex color code for the badge

Example:

"#FFD700"

avatar_url
string

URL to the badge image