

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Friends API",
    "version": "v1",
    "description": "## Overview\n\nThe Friends Service provides an HTTP API to manage user relationships of different types, and manage user\npresence.\n\nWe currently support the following types of Relationships:\n- FRIEND_REQUEST - an incoming or outgoing friend request.\n- FRIEND - an active friendship between two users that has been mutually accepted.\n- BLOCK - a one-way relationship that allows a user to block a different user in order to avoid game experiences with them.\n\nFriends makes it quick and easy to create and update relationships and provides the tools needed to\nefficiently integrate standard Friends functionality into your game.  The Presence features provide your players\nwith the ability to advertise their current status in the game to other players, and support for custom presence\nmetadata allows games to easily support features like join-in-progress or spectating.\n\nBuilt-in support for push notifications allows players to easily manage their friends lists and be quickly notified\nwhen the presence of any user changes."
  },
  "servers": [
    {
      "url": "https://social.services.api.unity.com",
      "description": "The default endpoint for the Friends service"
    }
  ],
  "security": [
    {
      "Client": []
    }
  ],
  "paths": {
    "/v1/relationships": {
      "get": {
        "summary": "Retrieve a list of relationships.",
        "description": "Retrieves a list of all relationships a given user is involved in.  Relationships of all types are returned in\na single array.  It's up to the caller to use the `type` of the relationship object to determine the appropriate\nway to handle that relationship.  For relationship types that allow it, additional presence and profile data\nwill be provided for each member of the relationship (unless excluded using the `withPresence` and `withProfile`\nparameters).\n\nBy default, we limit the number of relationships that can be returned in a single request.  You can make\nsubsequent requests to this API using the `offset` parameter to paginate through the remaining relationships.",
        "operationId": "GetRelationships",
        "responses": {
          "200": {
            "$ref": "#/components/responses/GetRelationships"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Relationships"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/withPresence"
          },
          {
            "$ref": "#/components/parameters/withProfile"
          },
          {
            "$ref": "#/components/parameters/type"
          }
        ]
      },
      "post": {
        "summary": "Create a new relationship.",
        "description": "Creates a relationship with one or more members.  A relationship has a `type` and a list of `members` who are\nthe users involved in the relationship.  The requirements for creating a relationship are different depending on\nthe `type` of the relationship.\n\nEach member of the relationship can also be given an optional `role` which may indicate some semantic of the\nthe relationship.  A member can be identified by their user id or profile name.\n\nFor most relationships, if the caller is a user and is not included in the `members` list, that user's membership\nis inferred to exist using the appropriate role.  For example, if you create a `FRIEND_REQUEST` relationship\nwith one member, the caller is inferred to be the source of the relationship.\n\n## Relationship Types\n\n### `FRIEND_REQUEST` Relationship\n\nA `FRIEND_REQUEST` relationship indicates that a user would like to create a friendship with another user.  If\nno `FRIEND` relationship (i.e. friendship) exists between the two users then the receiving game client will be\nnotified that a `FRIEND_REQUEST` relationship has been created, and the game can choose to notify the user and\nprovide a mechanism for them to accept the friend request.  A friend request is accepted by creating a\nreciprocal `FRIEND_REQUEST` relationship targeting the originating user.\n\nA `FRIEND_REQUEST` relationship can ONLY have two members.  The members have a role of either `SOURCE` or\n`TARGET` to indicate the sender and the receiver of the request.  If not provided the caller of the API will be\ninferred to be the `SOURCE` and the other member will be the `TARGET`.  A user cannot create a relationship with\nthemselves as the `TARGET`.\n\n### `FRIEND` Relationship\n\nA `FRIEND` relationship cannot be directly created by a user, but is implicitly created when both users have\ncreated `FRIEND_REQUEST` relationships with each other (i.e. sent and accepted a friend request).\n\nA `FRIEND` relationship is not directed, so the `members` of the relationships do not have an assigned `role`.\n\n### BLOCK Relationship\n\nA `BLOCK` relationship is a one-way relationship that enables a user to indicate that another user should be prevented\nfrom interacting with themselves for certain features and functionality (e.g. hiding presence, preventing the\nuser from sending messages to them, etc.).\n\nPresence blocking will be handled by the service to ensure that blocked users are unable to view the presence\ndetails of the blocker.  For other functionality it is up to the developer to consume the `BLOCK` relationships\ndata and provide additional functionality.  For example, a game client could filter out lobbies created by users\nthat have been blocked, or a game server could prevent a blocked user from joining a game instance.",
        "operationId": "CreateRelationship",
        "responses": {
          "200": {
            "$ref": "#/components/responses/AddRelationship"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Relationships"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/withPresence"
          },
          {
            "$ref": "#/components/parameters/withProfile"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddRelationshipRequest"
              },
              "examples": {
                "CreateFriendRequest": {
                  "value": {
                    "type": "FRIEND_REQUEST",
                    "members": [
                      {
                        "role": "TARGET",
                        "id": "s89e04c88-7c08-4a46-abe9-5b2089083c5c"
                      }
                    ]
                  }
                },
                "CreateFriendRequestByName": {
                  "value": {
                    "type": "FRIEND_REQUEST",
                    "members": [
                      {
                        "role": "TARGET",
                        "profileName": "ColorfulFlickeringHat#9"
                      }
                    ]
                  }
                },
                "CreateBlock": {
                  "value": {
                    "type": "BLOCK",
                    "members": [
                      {
                        "role": "TARGET",
                        "id": "s89e04c88-7c08-4a46-abe9-5b2089083c5c"
                      }
                    ]
                  }
                },
                "AcceptFriendRequest": {
                  "value": {
                    "type": "FRIEND_REQUEST",
                    "members": [
                      {
                        "role": "TARGET",
                        "id": "o4QFryYFXCC1YBocplAoijtxvQ2r"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/relationships/{relationshipId}": {
      "delete": {
        "summary": "Delete a relationship.",
        "description": "Deletes a relationship with the given `relationshipId`.",
        "operationId": "DeleteRelationship",
        "responses": {
          "204": {
            "description": "The resource was deleted successfully."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Relationships"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/relationshipId"
          }
        ]
      }
    },
    "/v1/message": {
      "post": {
        "summary": "Send a message to a user.",
        "description": "Allows a user to send a message with a custom payload to another user.  The Friends Service will only\nallow a user to send a message to a user that they have an active FRIEND relationship with.\n\nThe content of the payload can be customized entirely by the client.  It is up to the client to determine how to\nbest handle the message payload.  For example, if the message payload contains a lobby ID, the client could show\nan *Accept Invite* toast.  If the message contains a trade request, the client could enter a trading interface.",
        "operationId": "message",
        "responses": {
          "204": {
            "description": "The message was sent successfully."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Messaging"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRequest"
              },
              "examples": {
                "LobbyInvite": {
                  "value": {
                    "id": "89e04c88-7c08-4a46-abe9-5b2089083c5c",
                    "message": {
                      "lobby_deeplink": "8xw4ty"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/auth": {
      "get": {
        "summary": "Get notification auth details.",
        "description": "Retrieves both a subscription token and a channel name that the user should use to subscribe to notifications.\nThe Friends Service updates the notifications channel as changes to the user's\nrelationships occur.  This includes updates to the presence state of any friends, new friend requests (i.e.\n`FRIEND_REQUEST` relationships created), etc.\n\nIn general, the client should not depend on repeatedly polling the entire list of relationships to monitor for\nchanges, but should instead fetch the entire list once and then register for notifications of any updates.  This\nallows the client to keep the list up to date while minimizing overhead.",
        "operationId": "GetNotificationsAuth",
        "responses": {
          "200": {
            "$ref": "#/components/responses/GetNotificationAuth"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Notifications"
        ],
        "parameters": []
      }
    },
    "/v1/presence": {
      "post": {
        "summary": "Set presence for a user.",
        "description": "Updates the presence data for a user.  This can be either or both of the availability and the activity.\n\nUpdates to the presence for a user will be pushed to all users with active FRIEND relationships with that user.",
        "operationId": "SetPresence",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/GetUserPresence"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresenceRequest"
              },
              "examples": {
                "Online": {
                  "value": {
                    "availability": "ONLINE",
                    "activity": {
                      "location": "In Lobby"
                    }
                  }
                },
                "Away": {
                  "value": {
                    "availability": "AWAY",
                    "activity": {
                      "location": "In Menu"
                    }
                  }
                },
                "Offline": {
                  "value": {
                    "availability": "OFFLINE"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Presence"
        ]
      }
    },
    "/v1/presence/{userId}": {
      "get": {
        "summary": "Get presence for a user.",
        "description": "Retrieves the presence data for a specific user.  If the caller is a user, then the target user must be one that\nthe caller has an active `FRIEND` relationship with.",
        "operationId": "GetPresence",
        "responses": {
          "200": {
            "$ref": "#/components/responses/GetUserPresence"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Presence"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userId"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Client": {
        "type": "http",
        "scheme": "bearer",
        "description": "To get started with Authentication, see [Client Authentication].\n\n[Client Authentication]: https://services.docs.unity.com/docs/client-auth"
      }
    },
    "schemas": {
      "Relationships": {
        "description": "Response schema to API call to get relationships list.",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Relationship"
        }
      },
      "Relationship": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 255
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "expires": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/RelationshipType"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "description": "A list of members involved in the relationship."
          }
        },
        "required": [
          "id",
          "created",
          "type",
          "members"
        ]
      },
      "Member": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExtendedUser"
          },
          {
            "type": "object",
            "properties": {
              "role": {
                "description": "The role of the user in the relationship. This field only exists when the type is `FRIEND_REQUEST` or `BLOCK`.",
                "$ref": "#/components/schemas/Role"
              }
            }
          }
        ]
      },
      "AddRelationshipRequest": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/RelationshipType"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberIdentity"
            },
            "minItems": 1,
            "maxItems": 2
          }
        },
        "required": [
          "type",
          "members"
        ]
      },
      "MessageRequest": {
        "description": "Request schema for message endpoint.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          },
          {
            "type": "object",
            "properties": {
              "message": {
                "type": "object",
                "description": "The message to be sent to the target user. The maximum size of the message payload is 10 kilobytes."
              }
            },
            "required": [
              "message"
            ]
          }
        ]
      },
      "NotificationAuth": {
        "description": "Response schema to API call to retrieve user's notification resources to subscribe to.",
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          }
        },
        "required": [
          "token",
          "channel"
        ]
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "id"
        ]
      },
      "ExtendedUser": {
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          },
          {
            "type": "object",
            "properties": {
              "presence": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/UserPresence"
                  }
                ]
              },
              "profile": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/UserProfile"
                  }
                ]
              }
            }
          }
        ]
      },
      "MemberIdentity": {
        "type": "object",
        "description": "An identifiable member allows the user to decide on whether they want to add a user by name or by id.",
        "properties": {
          "profileName": {
            "type": "string",
            "maxLength": 255
          },
          "id": {
            "type": "string",
            "maxLength": 255
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          }
        }
      },
      "UserProfile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the user from Social Profiles."
          }
        },
        "required": [
          "name"
        ]
      },
      "RelationshipType": {
        "type": "string",
        "enum": [
          "FRIEND",
          "BLOCK",
          "FRIEND_REQUEST"
        ]
      },
      "Role": {
        "type": "string",
        "enum": [
          "TARGET",
          "SOURCE",
          "NONE"
        ]
      },
      "Error": {
        "description": "Schema to an API call when returning a status, title, and details about an error.",
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "Indicates the HTTP status code of the response."
          },
          "title": {
            "type": "string",
            "description": "Title of the response."
          },
          "detail": {
            "type": "string",
            "description": "Details about the response."
          },
          "details": {
            "type": "array",
            "description": "Array with details about all the internal validation errors with information including unique validation error code number and validation error message.",
            "items": {
              "$ref": "#/components/schemas/Detail"
            }
          },
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "An integer in the range of 24000-24999"
          },
          "type": {
            "type": "string",
            "description": "The type of error"
          },
          "requestID": {
            "type": "string",
            "description": "A unique ID for this request"
          }
        },
        "required": [
          "type",
          "status",
          "title",
          "code",
          "requestID",
          "detail"
        ]
      },
      "Detail": {
        "type": "object",
        "description": "Details about the internal error.",
        "properties": {
          "error": {
            "type": "string",
            "description": "Path to the parameter within the body that is invalid."
          },
          "message": {
            "type": "string",
            "description": "Detailed message about the error."
          }
        },
        "required": [
          "error",
          "message"
        ]
      },
      "PresenceRequest": {
        "type": "object",
        "properties": {
          "availability": {
            "type": "string",
            "description": "The current availability of the user.",
            "enum": [
              "ONLINE",
              "BUSY",
              "AWAY",
              "INVISIBLE",
              "OFFLINE"
            ]
          },
          "activity": {
            "type": "object",
            "description": "The current activity data of the user. The maximum for the activity object is 10 kilobytes."
          }
        },
        "required": [
          "availability"
        ]
      },
      "UserPresence": {
        "type": "object",
        "properties": {
          "availability": {
            "type": "string",
            "description": "The current availability of the user.",
            "enum": [
              "ONLINE",
              "BUSY",
              "AWAY",
              "OFFLINE",
              "UNKNOWN"
            ]
          },
          "activity": {
            "type": "object",
            "description": "The current activity data of the user."
          },
          "lastSeen": {
            "type": "string",
            "format": "date-time",
            "description": "The last time the user was seen in UTC. This property exists if the user's availability is `OFFLINE`."
          }
        },
        "required": [
          "availability"
        ]
      }
    },
    "responses": {
      "GetRelationships": {
        "description": "Response to API call to get friends list.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Relationships"
            },
            "examples": {
              "ok": {
                "value": [
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "FRIEND",
                    "members": [
                      {
                        "id": "ce7a03c4-78a3-4b93-ab8a-ef066f5388bf"
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "FRIEND",
                    "members": [
                      {
                        "id": "89e04c88-7c08-4a46-abe9-5b2089083c5c"
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": "2021-12-07T20:34:58Z",
                    "type": "FRIEND_REQUEST",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae72",
                        "role": "TARGET"
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": "2021-12-07T20:34:58Z",
                    "type": "FRIEND_REQUEST",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae73",
                        "role": "SOURCE"
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "BLOCK",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae75"
                      }
                    ]
                  }
                ]
              },
              "okWithPresence": {
                "value": [
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "FRIEND",
                    "members": [
                      {
                        "id": "ce7a03c4-78a3-4b93-ab8a-ef066f5388bf",
                        "presence": {
                          "availability": "ONLINE",
                          "activity": {
                            "location": "In Menu"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "FRIEND",
                    "members": [
                      {
                        "id": "89e04c88-7c08-4a46-abe9-5b2089083c5c",
                        "presence": {
                          "availability": "OFFLINE",
                          "lastSeen": "2021-11-17T21:34:58Z"
                        }
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "FRIEND",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae72",
                        "presence": {
                          "availability": "AWAY"
                        }
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": "2021-12-07T20:34:58Z",
                    "type": "FRIEND_REQUEST",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae73",
                        "role": "SOURCE"
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "BLOCK",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae73"
                      }
                    ]
                  }
                ]
              },
              "okWithProfiles": {
                "value": [
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "FRIEND",
                    "members": [
                      {
                        "id": "ce7a03c4-78a3-4b93-ab8a-ef066f5388bf",
                        "profile": {
                          "name": "ColorfulFlickeringHat#9"
                        }
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "FRIEND",
                    "members": [
                      {
                        "id": "89e04c88-7c08-4a46-abe9-5b2089083c5c",
                        "profile": {
                          "name": "LightThoughtfulUmbrella#2"
                        }
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": "2021-12-07T20:34:58Z",
                    "type": "FRIEND_REQUEST",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae72",
                        "profile": {
                          "name": "HappyLittleLamb#5"
                        },
                        "role": "TARGET"
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": "2021-12-07T20:34:58Z",
                    "type": "FRIEND_REQUEST",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae73",
                        "role": "SOURCE",
                        "profile": {
                          "name": "HappyLittleLamb#99"
                        }
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "BLOCK",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae73",
                        "profile": {
                          "name": "ColorfulFlickeringHat#99"
                        }
                      }
                    ]
                  }
                ]
              },
              "okSpecifiedTypeFriendAndBlock": {
                "value": [
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "FRIEND",
                    "members": [
                      {
                        "id": "ce7a03c4-78a3-4b93-ab8a-ef066f5388bf"
                      }
                    ]
                  },
                  {
                    "id": "<relationship_id>",
                    "created": "2021-11-17T20:34:58Z",
                    "expires": null,
                    "type": "BLOCK",
                    "members": [
                      {
                        "id": "ebe7db33-ee81-4b5a-b5e1-24fdad5bae73"
                      }
                    ]
                  }
                ]
              }
            }
          }
        }
      },
      "AddRelationship": {
        "description": "Response to API call when a relationship has been created.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Relationship"
            },
            "examples": {
              "CreateFriendRequest": {
                "value": {
                  "id": "<relationship_id>",
                  "created": "2021-11-17T20:34:58Z",
                  "expires": "2021-12-07T20:34:58Z",
                  "type": "FRIEND_REQUEST",
                  "members": [
                    {
                      "id": "s89e04c88-7c08-4a46-abe9-5b2089083c5c",
                      "profile": {
                        "name": "ColorfulFlickeringHat#9"
                      },
                      "role": "TARGET"
                    }
                  ]
                }
              },
              "Block": {
                "value": {
                  "id": "<relationship_id>",
                  "created": "2021-11-17T20:34:58Z",
                  "expires": null,
                  "type": "BLOCK",
                  "members": [
                    {
                      "id": "s89e04c88-7c08-4a46-abe9-5b2089083c5c",
                      "profile": {
                        "name": "ColorfulFlickeringHat#9"
                      },
                      "role": "TARGET"
                    }
                  ]
                }
              },
              "AcceptingIncomingRelationship": {
                "value": {
                  "id": "<relationship_id>",
                  "created": "2021-11-17T20:34:58Z",
                  "expires": "2022-11-17T20:34:58Z",
                  "type": "FRIEND",
                  "members": [
                    {
                      "id": "o4QFryYFXCC1YBocplAoijtxvQ2r",
                      "role": "SOURCE"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "GetNotificationAuth": {
        "description": "Response to API call to get notifications.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NotificationAuth"
            },
            "examples": {
              "ok": {
                "value": {
                  "token": "<notification_auth_jwt>",
                  "channel": "<notification_channel>"
                }
              }
            }
          }
        }
      },
      "Error": {
        "description": "Response for requests that provide an error.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "InvalidRelationshipId": {
                "value": {
                  "type": "http://unity.com/relationships/invalid_relationship",
                  "code": 24002,
                  "requestID": "12345",
                  "status": 400,
                  "title": "Bad Request",
                  "detail": "invalid relationship id"
                }
              },
              "InternalServerError": {
                "value": {
                  "type": "http://unity.com/relationships/internal_server_error",
                  "code": 24999,
                  "requestID": "12345",
                  "status": 500,
                  "title": "Internal Server Error",
                  "detail": "an unknown error occurred"
                }
              },
              "Forbidden": {
                "value": {
                  "type": "http://unity.com/relationships/token_validation_error",
                  "code": 24001,
                  "requestID": "12345",
                  "status": 403,
                  "title": "Forbidden",
                  "detail": "token validation error occurred"
                }
              },
              "RelationshipNotFound": {
                "value": {
                  "type": "http://unity.com/relationships/not_found",
                  "code": 24001,
                  "requestID": "12345",
                  "status": 404,
                  "title": "Not Found",
                  "detail": "relationship id does not exists"
                }
              },
              "BadRelationshipRequest": {
                "value": {
                  "type": "http://unity.com/relationships/invalid_target_user",
                  "code": 24000,
                  "requestID": "12345",
                  "status": 400,
                  "title": "Bad Request",
                  "detail": "invalid target user",
                  "details": [
                    {
                      "error": "members[0].id invalid",
                      "message": "user should not be targeting themselves for this operation"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "GetUserPresence": {
        "description": "Response for when fetching the presence data of the specified user",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UserPresence"
            },
            "examples": {
              "ok": {
                "value": {
                  "availability": "ONLINE",
                  "activity": {
                    "location": "In Menu"
                  }
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "limit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum records to return per pagination. The default value is 25.",
        "required": false,
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "maximum": 50,
          "default": 25
        }
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "description": "Maximum offset for pagination. The default value is 0.",
        "required": false,
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "default": 0
        }
      },
      "withPresence": {
        "name": "withPresence",
        "in": "query",
        "description": "Whether the response should return presence data.",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": true
        }
      },
      "withProfile": {
        "name": "withProfile",
        "in": "query",
        "description": "Whether the response should return profiles data.",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": true
        }
      },
      "userId": {
        "name": "userId",
        "in": "path",
        "description": "The userID.",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "relationshipId": {
        "name": "relationshipId",
        "in": "path",
        "description": "The relationship ID.",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "type": {
        "name": "type",
        "in": "query",
        "description": "The type of the relationship",
        "required": false,
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/RelationshipType"
          },
          "default": [
            "FRIEND",
            "BLOCK",
            "FRIEND_REQUEST"
          ]
        },
        "style": "form",
        "explode": false
      }
    }
  }
}
```