post
/users/@me/relationships/{user_id}Send friend request
Sends a friend request to a user identified by user ID. Returns the new relationship object. Can fail if user not found or request already sent.
send_friend_request
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| user_id* | path | SnowflakeType | The ID of the user |
Request body
application/json
json
{
"type": "object",
"properties": {
"staff_force_accept": {
"type": "boolean",
"description": "Staff-only: immediately create the friendship"
}
}
}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"
]
}