---
title: "Create an access request"
method: POST
path: "/api/v1/access_requests"
tags: ["access_requests"]
---

# Create an access request

`POST /api/v1/access_requests`

Request access to an application resource. When authenticating with an API token, user_id is required to specify the grantee.

## Headers

- `Idempotency-Key` string

## Request body

- CreateAccessRequest — Request body for creating an access request
  - `permission_ids` string[], required — List of permission IDs to request
  - `request_reason` string, required — Reason for requesting access
  - `resource_id` string, uuid, required — Resource ID to request access to
  - `user_id` string, uuid — User to request access for. Required when authenticating with an API token. With a user login, defaults to the authenticated user if omitted.

## Response `201`

Access request created

- AccessRequest — An access request
  - `application_id` string, uuid, required — Application ID
  - `duration` string, nullable — Duration of time-based access as an ISO 8601 duration (e.g. "PT1H", "P7D"); null for permanent access
  - `expires_at` string, date-time, nullable — When the time-based access expires; null for permanent access or a time-based request that has not been granted yet
  - `grantee_user_id` string, uuid — User ID of the grantee
  - `id` string, uuid, required — Access request ID
  - `inserted_at` string, date-time — Creation timestamp
  - `permission_ids` string[], required — Requested permission IDs
  - `provisioning_type` 'application_admin' | 'automatic', nullable — Provisioning type
  - `request_reason` string, required — Request reason
  - `requestor_user_id` string, uuid — User ID of the requestor
  - `resource_id` string, uuid, required — Resource ID
  - `status` 'pending_approval' | 'pending_permissions_assignment' | 'access_granted' | 'denied' | 'rejected' | 'processing_access' | 'scheduled' | 'pending_dependency', required — Current status of the access request

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Resource not found
- `422` — Validation error

---

[API](https://skmtc.net/accessowl/apis/accessowl-api.md) · [All operations](https://skmtc.net/accessowl/apis/accessowl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/accessowl/accessowl-api/versions/f01f507d4b4e/schema)
