# CreateConsent Endpoint: POST /consents Version: 1.0.0 Security: Api access ## Header parameters: - `api-version` (string) ## Request fields (application/json): - `bankId` (null,string) Optional unique identifier of the bank you are creating consent for, if not specified the user will be asked to select one. The unique identifiers can be found through the list bank API call (GET /banks). Example: "89F7F63B-67C0-4F70-A6BE-898BC211DCA0" - `channelType` (string) The banking channel. Enum: "unspecified", "openBanking", "psd2" - `expires` (null,string) The time the consent should expire. Defaults to: * psd2: 90 days * openbanking: no expiration - `properties` (object) Additional properties used for creating consents. - `redirectSettings` (null) Contains settings for redirects - `state` (null,string) Can be used by client to keep track of consent flow. Will be returned in response to CreateConsent API call and added to return url as a queryparameter if return url is specified. Example: "qwerty" - `subscriptionId` (null,string) Id of the subscription which this consent will created under. - `resourceGroupName` (null,string) Name of the resource-group which this consent will be organized under. - `resourceGroupDisplayName` (null,string) Display name of the resource-group which this consent will be organized under. ## Response 201 fields (application/json): - `consentId` (string) The consent id Example: "1E5EFC3B-635E-4973-A605-41D7F0D6D7B3" - `resourceId` (string) Fully qualified resource id of the consent - `redirectUrl` (null,string) Url to redirect the user to. Language can be preselected with query parameter (ui-culture) when redirecting users. Current supported languages are nb (norwegian bokmål) and en (english, default). Ex: https://google.com?ui-culture=nb Example: "https://google.com" - `status` (string) Status of the created consent Enum: "unknown", "created", "started", "authorized", "expired", "revoked", "failure", "awaitingApproval" - `state` (null,string) State from the request Example: "qwerty" ## Response 401 fields (application/json): - `type` (null,string) - `title` (null,string) - `status` (null,integer) - `detail` (null,string) - `instance` (null,string) ## Response 403 fields (application/json): - `type` (null,string) - `title` (null,string) - `status` (null,integer) - `detail` (null,string) - `instance` (null,string)