# Create consent Returns a redirect URL for the PSU to authorise the consent with the chosen bank. 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` (object) Contains settings for redirects - `redirectSettings.success` (null,string) The url to redirect the user to after a successful consent creation flow. If not specified the user is redirected to a default landing page after successfully completing the flow. Example: "https://www.google.com/search?q=success" - `redirectSettings.error` (null,string) The url to redirect the user to if something goes wrong. If not specified the user is redirected to a default error page if something went wrong. Example: "https://www.google.com/search?q=error" - `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. Example: "992606c793984bcf81e543d90ecfbb36" - `resourceGroupName` (null,string) Name of the resource-group which this consent will be organized under. Example: "999999999" - `resourceGroupDisplayName` (null,string) Display name of the resource-group which this consent will be organized under. Example: "Organisation AB" ## 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 Example: "/subscriptions/992606c793984bcf81e543d90ecfbb36/resource-groups/999999999/providers/aritma.banking/consents/0cb6e03a-c1d6-4d32-b438-0c2ad1e4079b" - `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 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)