# Request consent

Send a consent request to give the requesting user (the actor) permissions to act on behalf of another user (the subject) when needed. An email will be sent to the subject with a link to your consent page. The consent URI will include a query param named consent_id used to grant the consent, permissions array, and the subject's user ID as subject_id. Since this call must be initiated by a logged-in user, it's authorized using a user access token of the actor.

Endpoint: POST /v1/delegated-access/consents/me/request
Security: UserAccessToken

## Request fields (application/json):

  - `permissions` (array, required)
    Names of permissions

  - `consent_uri` (string, required)
    URI of your consent page, which the browser will redirect to when the user clicks the link in the consent email. The URI must accept the following query parameters: consent_id used to grant the consent, permissions array of permissions to present the user to approve, subject_id and actor_id. This URI must also be configured as an allowed redirect URI in the Admin Portal.
    Example: https://www.example.com/consent

  - `subject_id` (string, required)
    ID of the user that grants permissions to another user to act on their behalf

  - `consent_expiration` (number)
    Validity period of the consent in seconds. Once expired, new consent must be granted to obtain the permissions

## Response 400 fields (application/json):

  - `message` (array, required)
    Example: Bad request

  - `error_code` (number, required)
    Example: 400

## Response 404 fields (application/json):

  - `message` (string, required)

  - `error_code` (number, required)
    Example: 404

