# Create a link for a sub account to authorize their account We recommend calling this endpoint first when you onboard your users to cater for those that may already have Ryft accounts. If the email supplied is not registered with Ryft then you should instead use our account-links API to register a new user. This API can only be accessed for Hosted sub accounts. Endpoint: POST /accounts/authorize Version: 1.1.0 Security: secretApiKeyAuth ## Request fields (application/json): - `email` (string) The main email address for the account Example: "test@ryftpay.com" - `redirectUrl` (string) The URL to redirect back to once the customer has authenticated (success/fail). We will append the accountId under query parameter account for the customer onto your redirectUrl once they successfully authenticate. You should check for this parameter once the customer returns and store it for future use. Example: "https://mywebsite.com/account/verification?p1=kjr4jbnm4bm4b5mnb" ## Response 200 fields (application/json): - `createdTimestamp` (integer) The epoch timestamp (seconds) when the temporary auth link was created Example: 1631696701 - `expiresTimestamp` (integer) The epoch timestamp (seconds) when the temporary auth link expires Example: 1631703901 - `url` (string) The URL to redirect to. Example: "https://sandbox-dash.ryftpay.com/signin?atl=123" ## Response 400 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON" ## Response 404 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON" ## Response 500 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON"