Skip to main content
PATCH
/
api
/
v1
/
tracked-accounts
/
{id}
Assign Saved Search
curl --request PATCH \
  --url https://www.catchthegoodones.com/api/v1/tracked-accounts/{id}
{
  "account": {
    "id": 1,
    "xHandle": "youraccount",
    "savedSearchId": 3
  }
}
Assigns or removes a saved search from a tracked account. When a search is unassigned and no other account references it, the orphaned search is automatically deleted.

Headers

HeaderRequiredDescription
AuthorizationYesBearer ctgo_your_api_key_here
Content-TypeYesapplication/json

Path parameters

ParameterTypeDescription
idintegerThe tracked account ID

Body

FieldTypeRequiredDescription
savedSearchIdinteger or nullYesThe saved search ID to assign, or null to remove

Example

# Assign a saved search
curl -X PATCH https://www.catchthegoodones.com/api/v1/tracked-accounts/1 \
  -H "Authorization: Bearer ctgo_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"savedSearchId": 3}'

# Remove a saved search
curl -X PATCH https://www.catchthegoodones.com/api/v1/tracked-accounts/1 \
  -H "Authorization: Bearer ctgo_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"savedSearchId": null}'

Response

{
  "account": {
    "id": 1,
    "xHandle": "youraccount",
    "savedSearchId": 3
  }
}