Difference between revisions of "Bedrock Realms"

From wiki.vg
Jump to navigation Jump to search
(Undo revision 18553 by Vaporquake (talk))
Tag: Undo
 
(5 intermediate revisions by 4 users not shown)
Line 7: Line 7:
 
The information on this page may be incorrect and incomplete.
 
The information on this page may be incorrect and incomplete.
  
You can find a maintained [https://www.postman.com/LucienHH/workspace/bedrock-realms/overview Postmans Collection here]
+
You can find a maintained [https://www.postman.com/LucienHH/workspace/bedrock-realms/overview Postman Collection here]
  
  
Line 72: Line 72:
 
** '''gracePeriod''' - A boolean value of whether the Realm is in its grace period after expiry or not.
 
** '''gracePeriod''' - A boolean value of whether the Realm is in its grace period after expiry or not.
 
** '''worldType''' - The world type of the currently loaded world ("NORMAL" by default)
 
** '''worldType''' - The world type of the currently loaded world ("NORMAL" by default)
** '''players''' - Always null. (TODO: is it?)
+
** '''players''' - Always null. (The "players" object is shown only in response to single-target requests such as [https://wiki.vg/Bedrock_Realms#GET_.2Fworlds.2F.7Bid.7D GET /worlds/{id}] )
 
** '''maxPlayers''' - The maximum simultaneous player count of the Realm. (Integer, either 2 or 10)
 
** '''maxPlayers''' - The maximum simultaneous player count of the Realm. (Integer, either 2 or 10)
 
** '''minigameName''' - Unused, always null.
 
** '''minigameName''' - Unused, always null.
Line 475: Line 475:
 
  Accept: */*   
 
  Accept: */*   
 
  authorization: XBL3.0 [SERVICETOKEN]
 
  authorization: XBL3.0 [SERVICETOKEN]
  client-version: 1.18.12
+
  client-version: 1.18.12  
 
  user-agent: MCPE/UWP   
 
  user-agent: MCPE/UWP   
 
  Accept-Language: en-GB,en
 
  Accept-Language: en-GB,en
Line 640: Line 640:
 
'''Response'''
 
'''Response'''
 
  Returns 204 No Content
 
  Returns 204 No Content
 +
 +
=== POST /links/v1 ===
 +
 +
Generate a new invite code for a realm and revoke(delete) the old one. Returns 200 if successful. Note I haven't tested any type other than INFINITE, it seems to be the only one.
 +
 +
'''Request:'''
 +
POST /links/v1 HTTP/1.1 
 +
Accept: */* 
 +
Content-Type: application/json
 +
authorization: XBL3.0 [SERVICETOKEN]
 +
client-version: 1.19.71 
 +
user-agent: MCPE/UWP 
 +
Accept-Language: en-GB,en
 +
Accept-Encoding: gzip, deflate, be 
 +
Host: pocket.realms.minecraft.net
 +
 +
 +
'''Body'''
 +
{
 +
  "type": "INFINITE", "worldId": REALM_ID
 +
}
 +
 +
'''Response'''
 +
{
 +
  "linkId": REALM_CODE,
 +
  "profileUuid": REALM_OWNER_XUID,
 +
  "type": "INFINITE",
 +
  "ts": 12345678912345, // I couldn't figure out what this is
 +
  "url": "https://realms.gg/REALM_CODE",
 +
  "deepLinkUrl": "minecraft://acceptRealmInvite?inviteID=REALM_CODE"
 +
}
  
 
=== PUT /invites/{id}/invite/update ===
 
=== PUT /invites/{id}/invite/update ===
Line 725: Line 756:
  
 
'''Response'''
 
'''Response'''
wip
+
Either returns "Retry again later" or "true"
  
 
=== PUT /worlds/{id}/slot/{slotNum} ===
 
=== PUT /worlds/{id}/slot/{slotNum} ===

Latest revision as of 00:12, 8 August 2024


This page was created using information from Minecraft 1.10.1 on Windows 10. The process is (presumably) similar for Minecraft on Nintendo Switch, iOS, Android and Xbox One.

Edit: Recently updated with more endpoints available in the 1.17.1 release of Minecraft Bedrock Edition

The information on this page may be incorrect and incomplete.

You can find a maintained Postman Collection here


Authentication

Login is handled by Xbox Live, which is out of the scope of this page.

To authenticate with the endpoints, you need an Authorization header set with an XBL-3.0 Xbox Live service token.

Endpoints

Server hostname: https://pocket.realms.minecraft.net

GET /mco/client/compatible

Checks whether the current version is compatible with Minecraft Realms (usually reserved for the latest version). A `Client-Version` header must be set with the version of the game and a `User-Agent` header of the edition of the game. This is requested whenever the game is launched with an active internet connection and when logged in to Xbox Live.

This endpoint returns COMPATIBLE when the version is compatible, else it returns OUTDATED when the version is either outdated or a beta version is being used.

Request:

GET /mco/client/compatible HTTP/1.1
Accept: */*
Authorization: XBL3.0 [SERVICETOKEN]
Cache-Control: no-cache
Charset: utf-8
Client-Version: 1.10.1
User-Agent: MCPE/UWP
Accept-Language: en-GB
Accept-Encoding: gzip, deflate, br
Host: pocket.realms.minecraft.net
Connection: Keep-Alive

Response:

HTTP/1.1 200 OK
Content-Type: text/plain
Date: Sun, 07 Apr 2019 23:24:59 GMT
X-REQUEST-ID: [REQUESTID]
Content-Length: 10
Connection: keep-alive

COMPATIBLE

The [SERVICETOKEN] consists of the userhash and the Token from the XSTS step in the Microsoft authentication process, seperated by a ;.

Authorization: XBL3.0 x=userhash;Token

GET /worlds

Gets a list of realms the current Xbox Live user has access to. This is requested on every tab change and load of the "Play" screen. A `Client-Version` header and a `User-Agent` header must be sent with the request, however this is not verified.

Response (as JSON)

  • servers - An array containing every realm object.
    • id - The ID of the realm as an integer.
    • remoteSubscriptionId - The subscription ID of the realm as a string. (unknown purpose)
    • owner - This is always an empty string.
    • ownerUUID - The XboxUserID (XUID) of the owner as a string.
    • name - The name of the Realm as a string.
    • motd - This is always an empty string. (unknown usage).
    • defaultPermission - The default permission level of the Realm world. ("MEMBER" by default)
    • state - The state of the realm as a string. ("OPEN" or "CLOSED")
    • daysLeft - The days remaining before renewal of the Realm as an integer. (always 0 for Realms where the current user is not the owner)
    • expired - A boolean value of whether the Realm is expired or not.
    • expiredTrial - A boolean value of whether the Realm has expired as a trial or not.
    • gracePeriod - A boolean value of whether the Realm is in its grace period after expiry or not.
    • worldType - The world type of the currently loaded world ("NORMAL" by default)
    • players - Always null. (The "players" object is shown only in response to single-target requests such as GET /worlds/{id} )
    • maxPlayers - The maximum simultaneous player count of the Realm. (Integer, either 2 or 10)
    • minigameName - Unused, always null.
    • minigameId - Unused, always null.
    • minigameImage - Unused, always null.
    • activeSlot - The selected world slot from the realm, unused, always set to 1.
    • slots - Unknown, always null.
    • member - Unknown, always false. (even when member or owner)
    • clubId - The ID of the associated Xbox Live club as an integer.

GET /worlds/{id}

Gets information about the Realm and world specified in the URL. Returns a 403 error if the current user is not the owner of the Realm. A `Client-Version` header and a `User-Agent` header must be sent with the request, however this is not verified.

Response (as JSON):

  • id - The ID of the realm as an integer.
  • remoteSubscriptionId - The subscription ID of the realm as a string. (unknown purpose)
  • owner - This is always an empty string.
  • ownerUUID - The XUID of the owner as a string.
  • name - The name of the Realm as a string.
  • motd - This is always an empty string. (unknown usage).
  • defaultPermission - The default permission level of the Realm world. ("MEMBER" by default)
  • state - The state of the realm as a string. ("OPEN" or "CLOSED")
  • daysLeft - The days remaining before renewal of the Realm as an integer. (always 0 for Realms where the current user is not the owner)
  • expired - A boolean value of whether the Realm is expired or not.
  • expiredTrial - A boolean value of whether the Realm has expired as a trial or not.
  • gracePeriod - A boolean value of whether the Realm is in its grace period after expiry or not.
  • worldType - The world type of the currently loaded world ("NORMAL" by default)
  • players - An array containing all of the players who have been invited to the Realm, minus the owner.
    • uuid - The XUID of the player as a string.
    • name - Unknown, always null in testing. (Could change once player joins, untested)
    • operator - A boolean value of whether the player is an operator of the Realm or not.
    • accepted - A boolean value of whether the player has accepted the pending invite request.
    • online - A boolean value of whether the player is online on the realm.
    • permission - The permission value of the player as a string. ("MEMBER" by default)
  • maxPlayers - The maximum simultaneous player count of the Realm. (Integer, either 2 or 10)
  • minigameName - Unused, always null.
  • minigameId - Unused, always null.
  • minigameImage - Unused, always null.
  • activeSlot - The selected world slot from the Realm, unused, always set to 1.
  • slots - An array containing information on all the slots on the Realm.
    • options - A string containing JSON information on the world. (TODO: document data on this)
  • member - Unknown, always false. (even when member or owner)
  • clubId - The ID of the associated Xbox Live club as an integer.

GET /server/{id}/join

Gets the IP address and port of the Realm dedicated server specified in the URL. This is requested whenever the game attempts to load a Realm. Returns 403 if the current user doesn't have permission for that Realm. A `Client-Version` header and a `User-Agent` header must be sent with the request, however this is not verified.

Request:

GET https://pocket.realms.minecraft.net/worlds/[REALMID]/join HTTP/1.1
Accept: */*
Authorization: XBL3.0 [SERVICETOKEN]
Cache-Control: no-cache
Charset: utf-8
Client-Version: 1.8.2
User-Agent: MCPE/UWP
Accept-Language: en-GB
Accept-Encoding: gzip, deflate, br
Host: pocket.realms.minecraft.net
Connection: Keep-Alive

Response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 08 Apr 2019 00:02:05 GMT
X-REQUEST-ID: [REQUESTID]
Content-Length: 91
Connection: keep-alive

{"address":"[server address on amazonaws.com]:[realm port]","pendingUpdate":true}

GET /invites/count/pending

Gets the amount of pending Realm invites of the currently logged in Xbox Live user. The game periodically requests this while on the main menu of the game. The response is returned as an integer. A `Client-Version` header and a `User-Agent` header must be sent with the request, however, this is not verified.

Request:

GET /invites/count/pending HTTP/1.1
Accept: */*
Authorization: XBL3.0 [SERVICETOKEN]
Cache-Control: no-cache
Charset: utf-8
Client-Version: 1.10.1
User-Agent: MCPE/UWP
Accept-Language: en-GB
Accept-Encoding: gzip, deflate, br
Host: pocket.realms.minecraft.net
Connection: Keep-Alive

Response:

HTTP/1.1 200 OK
Content-Type: text/plain
Date: Sun, 07 Apr 2019 23:52:15 GMT
X-REQUEST-ID: [REQUESTID]
Content-Length: 1
Connection: keep-alive

0

GET /world/{id}/content

Gets ids of the Realms listed resource packs and behaviour packs.

Request:

GET /world/[REALMID]/content HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net  

Response:

{
   "worldId": Integer,
   "name": String,
   "resourcePacks": [
       {
           "packId": String,
           "version": String
       },
       {
           "packId": String,
           "version": String
       }
   ],
   "behaviorPacks": [
       {
           "packId": String,
           "version": String
       }
   ]
}

GET /subscriptions/{id}/details

Gets the details of the subscription for a Realm such as total time left and renewal date

Request:

GET /subscriptions/[REALMID]/details HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net  

Response:

{
   "type": "SUBSCRIPTION",
   "store": "xbox1.store",
   "startDate": 1623908801932,
   "endDate": 1626428175000,
   "renewalPeriod": 30,
   "daysLeft": 2,
   "subscriptionId": String
}

GET /worlds/{id}/backups

Gets an array of backups which includes metadata about the backup as well as the id which you can then use to download or replace a world with a backup.

Request:

GET /worlds/[REALMID]/backups HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

{
 "backups": [
   {
     "backupId": "2021-07-13T18:30:41.7172714Z",
     "lastModifiedDate": 1626201041000,
     "size": 35211208,
     "metadata": {
       "game_difficulty": "3",
       "name": "Test Realm",
       "game_server_version": "1.17.1",
       "enabled_packs": {
         "resourcePacks": [],
         "behaviorPacks": []
       },
       "description": null,
       "game_mode": "2",
       "world_type": "NORMAL"
     }
   }
 ]
}

GET /archive/download/world/{id}/1/{backupId}

Gets information about a backup including its download Url and token which you can then use to download the world file.

Request:

GET /archive/download/world/[REALMID]/1/[BACKUPID] HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

{
   "downloadUrl": "https://archive-pocket-production-eu-west-1.realms.minecraft.net/worlds",
   "token": AUTH_TOKEN,
   "size": 31885490
}

GET /archive/download/world/{id}/1/latest

Gets information about the latest backup including its download Url and token which you can then use to download the world file.

Request:

GET /archive/download/world/[REALMID]/1/latest HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

{
   "downloadUrl": "https://archive-pocket-production-eu-west-1.realms.minecraft.net/worlds",
   "token": AUTH_TOKEN,
   "size": 31885490
}

GET /links/v1?worldId={id}

Gets the invite links for a Realm.

Request:

GET /links/v1?worldId=[REALMID] HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

[
 {
   "linkId": String,
   "profileUuid": String,
   "type": "INFINITE",
   "ts": 1617994099284,
   "url": "https://realms.gg/[LINKID]",
   "deepLinkUrl": "minecraft://acceptRealmInvite?inviteID=[LINKID]"
 }
]

GET /trial/new

Returns whether the account is eligible for a free Realm trial. Returns 403 if already redeemed.

Request:

GET /trial/new HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

Unknown

GET /worlds/v1/link/{realmInviteCode}

Gets information about the Realm and world which belongs to the invite code.

Request:

GET /worlds/v1/link/[realmInviteCode] HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

Same as GET /worlds/{id} endpoint

GET /activities/live/players

Gets an array of Realms that are on the user's server list with information about which players are currently in the Realm. Often returns an empty array even though Realms have players in them

Request:

GET /activities/live/players HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

{
 "servers": [
   {
     "id": REALM_ID,
     "players": [
       {
         "uuid": PLAYER_XUID,
         "name": null,
         "operator": false,
         "accepted": true,
         "online": true,
         "permission": "MEMBER"
       },
       {
         "uuid": PLAYER_XUID,
         "name": null,
         "operator": false,
         "accepted": true,
         "online": true,
         "permission": "MEMBER"
       }
     ],
     "full": false
   }
 ]
}

GET /worlds/{id}/blocklist

Gets an array of XUIDs of all the banned players of that Realm

Request:

GET /worlds/[REALMID]/blocklist HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

[
  "XUID1",
  "XUID2"
]

POST /worlds/{id}/blocklist/{xuid]

Include a users XUID in the POST URL and they will be added to the blocklist for that Realm.

Request:

POST /worlds/[REALMID]/blocklist/[XUID] HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Reponse

204 No Content

POST /invites/v1/link/accept/{realmInviteCode}

Include the Realms invite code in the POST URL to add the Realm to your server list

Request:

POST /invites/v1/link/accept/[realmInviteCode] HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Reponse

Same as GET /worlds/{id} endpoint

POST /worlds/{id}/configuration

Update a Realms configuration. Change any field in the body and it'll update after making the POST request. Note I've only tested the description and name.

Request:

POST /worlds/[REALMID]/configuration HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.18.12 
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Body

{
 "description":{
   "description":"Test description",
   "name":"Test Realm"
 },
 "options":{
   "adventureMap":false,
   "cheatsAllowed":false,
   "commandBlocks":false,
   "customGameServerGlobalProperties":null,
   "difficulty":3,
   "enabledPacks":{
     "behaviorPacks":[],
     "resourcePacks":[]
   },
   "forceGameMode":false,
   "gameMode":0,
   "incompatibilities":[],
   "pvp":true,
   "resourcePackHash":null,
   "slotName":"My World",
   "spawnAnimals":true,
   "spawnMonsters":true,
   "spawnNPCs":true,
   "spawnProtection":0,
   "texturePacksRequired":false,
   "timeRequest":null,
   "versionLock":true,
   "versionRef":"5a7c1bcb9b95ebce0b42e7684a0c8f95f0e0c9d0",
   "worldTemplateId":-1,
   "worldTemplateImage":null,
   "worldSettings":{
     "sendcommandfeedback":{
       "type":0,
       "value":false
     },
     "commandblocksenabled":{
       "type":0,
       "value":true
     },
     "dodaylightcycle":{
       "type":0,
       "value":true
     },
     "randomtickspeed":{
       "type":1,
       "value":1
     },
     "naturalregeneration":{
       "type":0,
       "value":true
     },
     "showtags":{
       "type":0,
       "value":true
     },
     "commandblockoutput":{
       "type":0,
       "value":false
     },
     "dofiretick":{
       "type":0,
       "value":true
     },
     "maxcommandchainlength":{
       "type":1,
       "value":65535
     },
     "falldamage":{
       "type":0,
       "value":true
     },
     "tntexplodes":{
       "type":0,
       "value":true
     },
     "drowningdamage":{
       "type":0,
       "value":true
     },
     "domobloot":{
       "type":0,
       "value":true
     },
     "domobspawning":{
       "type":0,
       "value":true
     },
     "showbordereffect":{
       "type":0,
       "value":true
     },
     "showdeathmessages":{
       "type":0,
       "value":true
     },
     "respawnblocksexplode":{
       "type":0,
       "value":true
     },
     "doweathercycle":{
       "type":0,
       "value":true
     },
     "doentitydrops":{
       "type":0,
       "value":true
     },
     "doimmediaterespawn":{
       "type":0,
       "value":false
     },
     "freezedamage":{
       "type":0,
       "value":true
     },
     "pvp":{
       "type":0,
       "value":true
     },
     "keepinventory":{
       "type":0,
       "value":false
     },
     "doinsomnia":{
       "type":0,
       "value":true
     },
     "mobgriefing":{
       "type":0,
       "value":true
     },
     "dotiledrops":{
       "type":0,
       "value":true
     },
     "firedamage":{
       "type":0,
       "value":true
     },
     "functioncommandlimit":{
       "type":1,
       "value":10000
     },
     "spawnradius":{
       "type":1,
       "value":1
     },
     "showcoordinates":{
       "type":0,
       "value":false
     }
   }
 }

}

Response

Returns 204 No Content

POST /links/v1

Generate a new invite code for a realm and revoke(delete) the old one. Returns 200 if successful. Note I haven't tested any type other than INFINITE, it seems to be the only one.

Request:

POST /links/v1 HTTP/1.1  
Accept: */*  
Content-Type: application/json
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.19.71  
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net


Body

{
 "type": "INFINITE", "worldId": REALM_ID
}

Response

{
 "linkId": REALM_CODE,
 "profileUuid": REALM_OWNER_XUID,
 "type": "INFINITE",
 "ts": 12345678912345, // I couldn't figure out what this is
 "url": "https://realms.gg/REALM_CODE",
 "deepLinkUrl": "minecraft://acceptRealmInvite?inviteID=REALM_CODE"
}

PUT /invites/{id}/invite/update

Depending on the parameter passed you can invite someone to the Realm or remove them from the realm. Note this isn't like banning a player it removes the selected Realm from their server list and kicks them if they are logged in.

Request:

PUT /invites/[REALMID]/invite/update HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Body

{
 "invites": {
   "PLAYER_XUID": "ADD" || "REMOVE"
 }
}

Response

Same as GET /worlds/{id} endpoint

PUT /worlds/{id}/defaultPermission

Changes the default user permission within that realm. Options are VISITOR, MEMBER or OPERATOR

Request:

PUT /worlds/[REALMID]/defaultPermission HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Body

{
 "permission": "VISITOR" || "MEMBER" || "OPERATOR"
}

Response

Returns 204 No Content

PUT /worlds/{id}/userPermission

Changes a players permission within that realm. Options are VISITOR, MEMBER or OPERATOR

Request:

PUT /worlds/[REALMID]/userPermission HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Body

{
 "permission": "VISITOR" || "MEMBER" || "OPERATOR"
 "xuid":"PLAYER_XUID"
}

Response

Returns 204 No Content

PUT /worlds/{id}/backups?backupId={backupId}&clientSupportsRetries

Replaces the world of the realm with a backup. Note from testing, it seems you have to call this request twice for it to function, the first request always seems to 503 error.

Request:

PUT /worlds/{id}/backups?backupId={backupId}&clientSupportsRetries HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response Either returns "Retry again later" or "true"

PUT /worlds/{id}/slot/{slotNum}

Replaces the active world within a Realm. Slot number can be 1, 2 or 3.

Request:

PUT /worlds/{id}/slot/{slotNum} HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

true

PUT /worlds/{id}/open

Opens the specified Realm to all invited users and allows connections. Returns 403 if the current user is not the owner of the Realm. Returns 200 with the plaintext `true` if the action is successful, and 503 with the text `Retry again later` otherwise. A `Client-Version` header and a `User-Agent` header must be sent with the request, however, this is not verified.

Request:

PUT /worlds/[REALMID]/open HTTP/1.1
Accept: */*
Authorization: XBL3.0 [SERVICETOKEN]
Cache-Control: no-cache
Charset: utf-8
Client-Version: 1.10.1
User-Agent: MCPE/UWP
Accept-Language: en-GB
Accept-Encoding: gzip, deflate, br
Host: pocket.realms.minecraft.net
Content-Length: 0
Connection: Keep-Alive

Response:

HTTP/1.1 200 OK
Content-Type: text/plain
Date: Sun, 07 Apr 2019 23:52:15 GMT
X-REQUEST-ID: [REQUESTID]
Content-Length: 1
Connection: keep-alive

true

PUT /worlds/{id}/close

Closes the specified Realm and disables all new connections to the server. Returns 403 if the current user is not the owner of the Realm. Returns 200 with the plaintext `true` if the action is successful, and 503 with the text `Retry again later` otherwise. A `Client-Version` header and a `User-Agent` header must be sent with the request, however, this is not verified.

Request:

PUT /worlds/[REALMID]/close HTTP/1.1
Accept: */*
Authorization: XBL3.0 [SERVICETOKEN]
Cache-Control: no-cache
Charset: utf-8
Client-Version: 1.10.1
User-Agent: MCPE/UWP
Accept-Language: en-GB
Accept-Encoding: gzip, deflate, br
Host: pocket.realms.minecraft.net
Content-Length: 0
Connection: Keep-Alive

Response:

HTTP/1.1 200 OK
Content-Type: text/plain
Date: Sun, 07 Apr 2019 23:52:15 GMT
X-REQUEST-ID: [REQUESTID]
Content-Length: 1
Connection: keep-alive

true

DELETE /worlds/{id}/blocklist/{xuid}

Include a users XUID in the POST URL and they will be removed from the blocklist for that Realm.

Request:

DELETE /worlds/[REALMID]/blocklist/[XUID] HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

Returns 204 No Content

DELETE /invites/{id}

Removes the specified realm from your joinable realms list.

Request:

DELETE /invites/[REALMID] HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

Returns 204 No Content

DELETE /worlds/{id}

Deletes a Realm completely.

Request:

DELETE /worlds/[REALMID] HTTP/1.1  
Accept: */*  
authorization: XBL3.0 [SERVICETOKEN]
client-version: 1.17.10   
user-agent: MCPE/UWP  
Accept-Language: en-GB,en
Accept-Encoding: gzip, deflate, be  
Host: pocket.realms.minecraft.net

Response

Returns 204 No Content