Skip to content

Create a request

Request

Beta
OAuth 2.0 scope:
  • okta.governance.accessRequests.manage
Admin roles:
  • ACCESS_REQUESTS_ADMIN

Creates a request to access a resource in your organization.

When creating a request, you specify:

  • the request type (requestTypeId) to use for the request
  • and the subject line (subject) of the request

Optionally, you can specify:

  • The requester user IDs for the request. If not provided, user IDs are obtained from the user identity of the API Token or Access Token.
Bodyapplication/jsonrequired

The writable attributes of a request

requestTypeIdstring, (request-type-id), = 24 characters(request-type-id)^[a-fA-F\d]{24}$required

The request type id.

Example:"05ab2db568c7c300079fefd0"
subjectstring, [ 1 .. 250 ] characters(request-subject)required

The subject of the request

Example:"Requesting access to salesforce-01 for my team member"
requesterUserIdsArray of strings, = 1 items(requester-user-ids)

A list of requester Okta user ids.

Example:
[ "00ub0oNGTSWTBKOLGLNR", "00ub0oNGTSWTBKOLGLNR" ]
requesterFieldValuesArray of objects(requester-field-values-writable)

Field values provided when adding the request.

If a request type has required requesterFields, they must be provided when the request is created.

Non-required fields may be omitted when creating the request.

POST
/governance/api/v1/requests
curl -i -X POST \
  https://okta-subdomain.pixtulate.com/governance/api/v1/requests \
  -H 'Content-Type: application/json' \
  -d '{
    "requestTypeId": "08ab2db568c7c300079fefd0",
    "subject": "I need access to Salesforce"
  }'

Responses

A successful create request response

Headers
X-Rate-Limit-Limitinteger, >= 1required

The rate-limit ceiling for the current request

Example:60
X-Rate-Limit-Remaininginteger, >= 0required

The number of requests left for the current rate-limit window

Example:60
X-Rate-Limit-Resetinteger, >= 0required

The time when the rate limit resets, specified in UTC epoch time (in seconds)

Example:1609459200
Bodyapplication/json
idstring, non-emptyrequired

Unique identifier for the object

createdBystring, (okta-user-id), [ 1 .. 20 ] characters(created-by)read-onlyrequired

The id of the Okta user who created the resource

createdstring, (date-time)(created)read-onlyrequired

The ISO 8601 formatted date and time when the resource was created

lastUpdatedstring, (date-time)(last-updated)read-onlyrequired

The ISO 8601 formatted date and time when the object was last updated

lastUpdatedBystring, (okta-user-id), [ 1 .. 20 ] characters(last-updated-by)read-onlyrequired

The id of the Okta user who last updated the object

requestTypeIdstring, (request-type-id), = 24 characters(request-request-type-id)(?=^[a-fA-F\d]{24}$)(?=^[a-fA-F\d]{24}$)required

The request type id.

Example:"05ab2db568c7c300079fefd0"
subjectstring, [ 1 .. 250 ] characters(request-subject)required

The subject of the request

Example:"Can I have access to Salesforce?"
requesterUserIdsArray of strings, = 1 items(requester-user-ids)required

A list of requester Okta user ids.

Example:
[ "00ub0oNGTSWTBKOLGLNR" ]
requestStatusstring(request-request-status)required

A request has a lifecycle. See our request lifecycle documentation.

A request progresses in its lifecycle state based on requester, approver, and administrator activities across a variety of channels, such as:

  • Access Request portal
  • Slack
  • Microsoft teams

The following lifecycle operations are available on a single request.

Enum:"OPEN""PENDING""RESOLVED""LOCKED"
resolvedstring or null, (date-time)(request-resolved-date-time)required

The date the request was resolved. The property may transition from having a value to null if the request is reopened.

requesterFieldValuesArray of any or null(requester-field-values)required

Field values provided when adding the request.

If a request type has required requesterFields, they must be provided when the request is created.

Non-required fields may be omitted when creating the request.

approvalsArray of objects(request-approval)required

Request approvals

actionsArray of objects or null, = 1 items(request-actions)required

A list of actions. Currently only supports one action per request.

permalinkIdinteger(request-permalink-id)required

The immutable, persistent identifier that always resolves to the request

typestringrequired

This request is associated with a request type with no CUSTOM settings.

Value:"ACCESS_REQUEST"
Discriminator
Response
Request access for authenticated user by omitting `requesterUserIds`
{ "id": "61eb06a3c462d20007f0235c", "subject": "Tom requests access to Salesforce", "requestTypeId": "08ab2db568c7c300079fefd0", "created": "2022-05-05T14:15:22Z", "createdBy": "00ub0oNGTSWTBKOLGLNR", "lastUpdated": "2022-05-05T14:15:22Z", "lastUpdatedBy": "00ub0oNGTSWTBKOLGLNR", "permalinkId": 1, "resolved": null, "requestStatus": "OPEN", "requesterUserIds": [ "00ub0oNGTSWTBKOLGLNR" ], "requesterFieldValues": null, "approvals": [ {}, {} ], "actions": [ {} ], "type": "ACCESS_REQUEST", "_links": { "requestType": {}, "self": {} } }