Insights
Update the insight note of a fan
/v1/accounts/{account_id}/fans/{fan_id}/insightSets the free-text CRM note. You must pass the concurrency token from a prior GET, either as the etag body field or as an If-Match header: the two are equivalent, pick the one that suits your client. Without one you get 428; if the note changed since you read it you get 412 (the error body carries current_etag, so you can retry without re-reading). The response carries the new token, again in both the body and the ETag header.
write:insightscurl -X PATCH 'https://api.fansquare.so/v1/accounts/c851d9d6-b90b-4958-aed2-2fdaa2fe21a3/fans/a6df8022-e509-4575-ad28-e29c2d1d42dc/insight' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"note": "Prefers short replies. Birthday on March 3. Ask about the trip to Lisbon.",
"etag": "3f2a9c1e"
}'{
"note": "Prefers short replies. Birthday on March 3. Ask about the trip to Lisbon.",
"etag": "8c41d07e"
}Parameters
Headers
Fansquare-VersionstringrequiredAPI version to pin. Accepts the mineral name or the release date of a version.
If-MatchstringConcurrency token from a prior read, quoted or not. Alternative to the
etagbody field.
Path
account_idstringrequiredMYM account id (
account.external_idin GET /v1/creators).min length 1fan_idstringrequiredMYM fan id.
format uuid
Body
application/json
notestring | nullNew note text, or null to clear it. Omit to leave the note unchanged. Plain text, stored as sent. Use
\nfor a line break and\n\nfor a blank line between paragraphs. Each escape counts as one character against the 2000 limit.max length 2000etagstringConcurrency token from a prior GET or PATCH. Required unless you send the same value in an
If-Matchheader.
Response
OK, application/json
Headers
ETagstringConcurrency token, quoted per HTTP. Identical to the
etagbody field, which is easier to consume in most clients. Use whichever you prefer.
notestring | nullrequiredFree-text CRM note on this creator×fan relation, or null when none is set. Plain text, stored as sent. Use
\nfor a line break and\n\nfor a blank line between paragraphs. Each escape counts as one character against the 2000 limit.etagstringrequiredConcurrency token for this note. Send it back on the next PATCH (as the
etagbody field, or as anIf-Matchheader) so an edit never overwrites a change you have not seen. Also returned as theETagresponse header, unquoted here.
curl -X PATCH 'https://api.fansquare.so/v1/accounts/c851d9d6-b90b-4958-aed2-2fdaa2fe21a3/fans/a6df8022-e509-4575-ad28-e29c2d1d42dc/insight' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"note": "Prefers short replies. Birthday on March 3. Ask about the trip to Lisbon.",
"etag": "3f2a9c1e"
}'{
"note": "Prefers short replies. Birthday on March 3. Ask about the trip to Lisbon.",
"etag": "8c41d07e"
}