Skip to content
Console
Menu

Alerts and status pages

App store purchases

Credits

Knowledge

KV

Notifications

Organizations

Storage

Workflows

API reference

Getting Started

Authentication

KV Store

Set relationship on a chat profile

Changes friendship or a bilateral interaction block.

Changes friendship or a bilateral interaction block.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/chat_profiles/chat-profile:setRelationship
  • Scope events:write
  • Effect write — a successful call changes state.
  • Collection chat_profiles

#Request

FieldTypeWhat it is
namestringActing user's profile. Required.
peer_idstringOther user's stable client id. Required.
actionstringrequest, accept, remove, block or unblock. Required.

#Response

FieldTypeWhat it is
client_idstringActing member.
peer_idstringOther member.
requestedboolThis user requested friendship.
mutualboolBoth users accepted friendship.
blockedboolEither user blocked the other; interaction is denied both ways.
peerChatProfileOther member's profile and fresh presence.

#ChatProfile

FieldTypeWhat it is
namestringResource name; the last segment is the stable authenticated client id.
uidstringStable service-derived identifier. Output only.
metaResourceMetaResource metadata.
terms_versionstringAccepted code of conduct version, before first send; includes disclosure that images go to a third-party AI model provider through Sylphx AI Gateway. Output only.
display_namestringUser-visible name. Output only.
officialboolTrusted backend verification, never a message-supplied flag. Output only.
allow_stranger_imagesboolExplicit opt-in to images from non-mutual contacts; default false. Output only.
onlineboolFresh presence on any joined conversation. Output only.
activitystringLatest presence activity, including title and game, if the member supplied it. Output only.
quiet_hours_start_utc_minuteint32UTC quiet-hours start in minutes, 0..1439. Omit both fields to disable. Output only.
quiet_hours_end_utc_minuteint32UTC exclusive end, 0..1440; may wrap midnight. Output only.

#ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/chat_profiles/chat-profile:setRelationship" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"…","peer_id":"…"}'