put/users/@me/relationships/{user_id}

Accept or update friend request

Accepts a pending incoming friend request from a user or updates the relationship type. Can also be used to change friend relationship to blocked status. Returns updated relationship object.

accept_or_update_friend_request

Parameters

NameInTypeDescription
user_id*pathSnowflakeTypeThe ID of the user

Request body

application/json

json
{
  "type": "object",
  "properties": {
    "type": {
      "$ref": "#/components/schemas/RelationshipTypes",
      "description": "Type of relationship to create"
    }
  }
}

Responses

200

Success

json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)$",
      "description": "The unique identifier for the relationship"
    },
    "type": {
      "$ref": "#/components/schemas/RelationshipTypes",
      "description": "The type of relationship (friend, blocked, pending, etc.)"
    },
    "user": {
      "$ref": "#/components/schemas/UserPartialResponse"
    },
    "since": {
      "type": "string",
      "format": "date-time",
      "description": "ISO8601 timestamp of when the relationship was established"
    },
    "nickname": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "A custom nickname set for the related user"
    },
    "share_voice_activity": {
      "type": "boolean",
      "description": "Whether the current user has chosen to share their voice activity with this friend on the Active Now panel"
    },
    "friend_shares_voice_activity": {
      "type": "boolean",
      "description": "Whether this friend has chosen to share their voice activity with the current user; for non-friend types this is always true"
    }
  },
  "required": [
    "id",
    "type",
    "user",
    "nickname",
    "share_voice_activity",
    "friend_shares_voice_activity"
  ]
}
400

Bad Request - The request was malformed or contained invalid data

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
401

Unauthorized - Authentication is required or the token is invalid

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
403

Forbidden - You do not have permission to perform this action

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
429

Too Many Requests - You are being rate limited

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "enum": [
        "RATE_LIMITED"
      ]
    },
    "message": {
      "type": "string"
    },
    "retry_after": {
      "type": "number",
      "description": "Seconds to wait before retrying"
    },
    "global": {
      "type": "boolean",
      "description": "Whether this is a global rate limit"
    }
  },
  "required": [
    "code",
    "message",
    "retry_after"
  ]
}
500

Internal Server Error - An unexpected error occurred

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}