Skip to content

Replace a trusted origin

Request

OAuth 2.0 scope:
  • okta.trustedOrigins.manage

Replaces a trusted origin

Path
trustedOriginIdstringrequired

id of the trusted origin

Example:7j2PkU1nyNIDe26ZNufR
Bodyapplication/jsonrequired
createdBystring

The ID of the user who created the trusted origin

lastUpdatedBystring

The ID of the user who last updated the trusted origin

namestring, <= 255(TrustedOriginName)

Unique name for the trusted origin

originstring, <= 255(TrustedOriginOrigin)

Unique origin URL for the trusted origin. The supported schemes for this attribute are HTTP, HTTPS, FTP, Ionic 2, and Capacitor.

scopesArray of objects, <= 3(TrustedOriginScopes)

Array of scope types that this trusted origin is used for

statusstring(LifecycleStatus)
Enum:"ACTIVE""INACTIVE"
curl -i -X PUT \
  https://subdomain.okta.com/api/v1/trustedOrigins/7j2PkU1nyNIDe26ZNufR \
  -H 'Content-Type: application/json' \
  -d '{
    "value": {
      "id": "tosue7JvguwJ7U6kz0g3",
      "name": "Updated Example trusted origin",
      "origin": "http://updated.example.com",
      "scopes": [
        {
          "type": "CORS"
        },
        {
          "type": "REDIRECT"
        }
      ],
      "status": "ACTIVE",
      "created": "2017-12-16T05:01:12.000Z",
      "createdBy": "00ut5t92p6IEOi4bu0g3",
      "lastUpdated": "2017-12-16T05:01:12.000Z",
      "lastUpdatedBy": "00ut5t92p6IEOi4bu0g3",
      "_links": {
        "self": {
          "href": "https://${yourOktaDomain}/api/v1/trustedOrigins/tosue7JvguwJ7U6kz0g3",
          "hints": {
            "allow": [
              "GET",
              "PUT",
              "DELETE"
            ]
          }
        },
        "deactivate": {
          "href": "https://${yourOktaDomain}/api/v1/trustedOrigins/tosue7JvguwJ7U6kz0g3/lifecycle/deactivate",
          "hints": {
            "allow": [
              "POST"
            ]
          }
        }
      }
    }
  }'

Responses

Success

Bodyapplication/json
createdstring, (date-time)read-only

Timestamp when the trusted origin was created

createdBystring

The ID of the user who created the trusted origin

idstringread-only

Unique identifier for the trusted origin

lastUpdatedstring, (date-time)read-only

Timestamp when the trusted origin was last updated

lastUpdatedBystring

The ID of the user who last updated the trusted origin

namestring, <= 255(TrustedOriginName)

Unique name for the trusted origin

originstring, <= 255(TrustedOriginOrigin)

Unique origin URL for the trusted origin. The supported schemes for this attribute are HTTP, HTTPS, FTP, Ionic 2, and Capacitor.

scopesArray of objects, <= 3(TrustedOriginScopes)

Array of scope types that this trusted origin is used for

statusstring(LifecycleStatus)
Enum:"ACTIVE""INACTIVE"
Response
{ "value": { "id": "tosue7JvguwJ7U6kz0g3", "name": "Updated Example trusted origin", "origin": "http://updated.example.com", "scopes": [ … ], "status": "ACTIVE", "created": "2017-12-16T05:01:12.000Z", "createdBy": "00ut5t92p6IEOi4bu0g3", "lastUpdated": "2017-12-16T05:01:12.000Z", "lastUpdatedBy": "00ut5t92p6IEOi4bu0g3", "_links": { … } } }