Realms

The Realms API provides operations to manage realms

List all Realms
OAuth 2.0: okta.realms.read

Lists all Realms

Request
query Parameters
limit
integer <int32>
Default: 200

Specifies the number of results returned. Defaults to 10 if search is provided.

after
string

The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination.

search
string

Searches for Realms with a supported filtering expression for most properties

sortBy
string

Specifies field to sort by and can be any single property (for search queries only).

Example: sortBy=profile.name
sortOrder
string
Default: "asc"

Specifies sort order asc or desc (for search queries only). This parameter is ignored if sortBy isn't present.

Responses
200

OK

403

Forbidden

429

Too Many Requests

get/api/v1/realms
Request samples
Response samples
application/json
[]

Create a Realm
OAuth 2.0: okta.realms.manage

Creates a new Realm

Request
Request Body schema: application/json
required
object (RealmProfile)
name
required
string

Name of a Realm

realmType
string

Used to store partner users. This must be set to Partner to access Okta's external partner portal.

Enum: Description
PARTNER

Realm with external partner portal

DEFAULT

Default

Responses
200

Success

400

Bad Request

403

Forbidden

429

Too Many Requests

post/api/v1/realms
Request samples
application/json
{
  • "profile": {
    • "name": "string",
    • "realmType": "PARTNER"
    }
}
Response samples
application/json
{
  • "created": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "isDefault": true,
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "profile": {
    • "name": "string",
    • "realmType": "PARTNER"
    },
  • "_links": {
    • "self": {
      }
    }
}

Retrieve a Realm
OAuth 2.0: okta.realms.read

Retrieves a Realm

Request
path Parameters
realmId
required
string

id of the Realm

Example: vvrcFogtKCrK9aYq3fgV
Responses
200

Success

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/realms/{realmId}
Request samples
Response samples
application/json
{}

Replace the realm profile
OAuth 2.0: okta.realms.manage

Replaces the realm profile

Request
path Parameters
realmId
required
string

id of the Realm

Example: vvrcFogtKCrK9aYq3fgV
Request Body schema: application/json
required
object (RealmProfile)
name
required
string

Name of a Realm

realmType
string

Used to store partner users. This must be set to Partner to access Okta's external partner portal.

Enum: Description
PARTNER

Realm with external partner portal

DEFAULT

Default

Responses
200

Success

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

put/api/v1/realms/{realmId}
Request samples
application/json
{
  • "profile": {
    • "name": "string",
    • "realmType": "PARTNER"
    }
}
Response samples
application/json
{
  • "created": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "isDefault": true,
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "profile": {
    • "name": "string",
    • "realmType": "PARTNER"
    },
  • "_links": {
    • "self": {
      }
    }
}

Delete a Realm
OAuth 2.0: okta.realms.manage

Deletes a Realm permanently. This operation can only be performed after disassociating other entities like Users and Identity Providers from a Realm.

Request
path Parameters
realmId
required
string

id of the Realm

Example: vvrcFogtKCrK9aYq3fgV
Responses
204

No Content

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

delete/api/v1/realms/{realmId}
Request samples
Response samples
application/json
{
  • "errorCauses": [
    • {
      }
    ],
  • "errorCode": "string",
  • "errorId": "string",
  • "errorLink": "string",
  • "errorSummary": "string"
}