curl --request PATCH \
--url https://api.goyappr.com/lead-tags/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"color": "<string>",
"description": "<string>",
"sort_order": 123
}
'import requests
url = "https://api.goyappr.com/lead-tags/{id}"
payload = {
"name": "<string>",
"color": "<string>",
"description": "<string>",
"sort_order": 123
}
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({name: '<string>', color: '<string>', description: '<string>', sort_order: 123})
};
fetch('https://api.goyappr.com/lead-tags/{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.goyappr.com/lead-tags/{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([
'name' => '<string>',
'color' => '<string>',
'description' => '<string>',
'sort_order' => 123
]),
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.goyappr.com/lead-tags/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"sort_order\": 123\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.goyappr.com/lead-tags/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"sort_order\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/lead-tags/{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 \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"sort_order\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"color": "<string>",
"sort_order": 123,
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}Update Lead Tag
curl --request PATCH \
--url https://api.goyappr.com/lead-tags/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"color": "<string>",
"description": "<string>",
"sort_order": 123
}
'import requests
url = "https://api.goyappr.com/lead-tags/{id}"
payload = {
"name": "<string>",
"color": "<string>",
"description": "<string>",
"sort_order": 123
}
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({name: '<string>', color: '<string>', description: '<string>', sort_order: 123})
};
fetch('https://api.goyappr.com/lead-tags/{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.goyappr.com/lead-tags/{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([
'name' => '<string>',
'color' => '<string>',
'description' => '<string>',
'sort_order' => 123
]),
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.goyappr.com/lead-tags/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"sort_order\": 123\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.goyappr.com/lead-tags/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"sort_order\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/lead-tags/{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 \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"sort_order\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"color": "<string>",
"sort_order": 123,
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}lead_tags:manage.
The tag’s id does not change, so every lead that carries it keeps carrying
it: renaming is safe, and is the right move when a label has gone stale.
Deleting and recreating is not the same thing — that produces a new id with no
lead attached to it, and is refused while leads still carry the old one. See
Delete.
curl --request PATCH "$YAPPR_API_URL/lead-tags/c846bc22-5ee9-4254-bfbf-66614017241e" \
--header "Authorization: Bearer $YAPPR_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "color": "#14b8a6", "description": "Renewal due within 30 days" }'
| Field | Meaning |
|---|---|
name | The new name. Still unique within the workspace. |
description | Free text, or null to clear it. |
color | A hex string, or null for the dashboard’s default grey. |
sort_order | Where the tag sits in the list, ascending. Nothing renumbers the other tags, so two tags may end up sharing a position; give the whole set distinct numbers if the order matters to you. |
400 rather than a no-op, so an empty
body is treated as a mistake rather than silently accepted.
Response
{
"id": "c846bc22-5ee9-4254-bfbf-66614017241e",
"name": "renewal-due",
"description": "Renewal due within 30 days",
"color": "#14b8a6",
"sort_order": 10,
"created_at": "2026-09-21T07:58:32.022127+00:00"
}
created_at is
the original creation time; there is no updated_at to read.
Errors
| HTTP | Body | When |
|---|---|---|
400 | {"error":"Changing a lead tag does not take colour. It takes name, description, color, sort_order — …","code":"LEAD_TAG_REQUEST_INVALID"} | A body field this route does not read — a misspelling included. Nothing was written. |
400 | {"error":"Send at least one of name, description, color, sort_order. …","code":"LEAD_TAG_REQUEST_INVALID"} | The body parsed but carried none of name, description, color, sort_order. |
400 | {"error":"Invalid JSON body","code":"LEAD_TAG_REQUEST_INVALID"} | The body did not parse. |
404 | {"error":"Lead tag not found","code":"NOT_FOUND"} | No tag with that id in this workspace. |
409 | {"error":"A tag with this name already exists","code":"DUPLICATE_NAME"} | The new name is already taken by another tag. Nothing was changed. |
403 | {"error":"This key does not hold …","code":"INSUFFICIENT_SCOPE"} | The key does not hold lead_tags:manage. |
429 | {"error":"Rate limit exceeded. Try again in a moment.","code":"RATE_LIMIT"} | 60 requests per minute per key. |
500 | {"error":"Failed to update lead tag"} | The update itself failed. Retry; nothing was changed. |
Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).