Returning.AIDevelopers
v1

API reference / Legacy / Authentication

.md

Secure Auth

Secure Auth

Last updated 26 Sep 2026API v1

Method
GET
Path
https://api.returning.ai/api/secureAuth

Authentication#

Header
Authorization: Bearer <API_KEY>

Behaviour#

What it is for

Secure Auth. Use this as part of password-based account authentication rather than broker system ingestion.

How to use it

Send a GET request to /api/secureAuth with the request body, query parameters, or multipart fields shown below. Authentication depends on the owning service. Keep credentials server-side and verify required permissions before production use.

Successful response

HTTP 200. The body follows the endpoint schema; many integration endpoints wrap the useful payload under data with status and message.

Common error states
  • 400 invalid request body, query, ObjectId, pagination, file format, or missing required field.
  • 401 missing, invalid, expired, or insufficient API key/token.
  • 403 key is valid but cannot access this community/channel/user/resource, where supported by the service.
  • 404 target resource, route, or community-scoped record was not found.
  • 409 duplicate or conflicting state for create/update operations, where applicable.
  • 500 unexpected Returning.AI service error.

Request#

Query parameters#

accessLevel#stringREQUIRED
accessLevel query used by this endpoint.

Eg0

action#stringREQUIRED
action query used by this endpoint.

Eglogin

userId#string[]REQUIRED
user's username for authentication

Eg["<Username>"]

email#stringOPTIONAL
user's email

Eg<Email>

firstname#stringOPTIONAL
user's first name

Eg<First Name>

lastname#stringOPTIONAL
user's last name

Eg<Last Name>

displayname#stringOPTIONAL
user's displayname

Eg<Display Name>

Headers#

Authorization#stringREQUIRED
API key.

RuleBearer <API_KEY>

apiKey#stringOPTIONAL
apiKey header used by this endpoint.

EgAPI_KEY_HERE

hostname#stringOPTIONAL
hostname header used by this endpoint.

Egcname.yourdomain.com

curl --request GET \
  --url 'https://api.returning.ai/api/secureAuth?accessLevel=0&action=login&userId=<Username>&email=<Email>&firstname=<First%20Name>&lastname=<Last%20Name>&displayname=<Display%20Name>' \
  --header 'Authorization: Bearer <API_KEY>'

Response#

error#booleanALWAYS

Egfalse

loginUrl#stringALWAYS

Eg"https://cname.yourdomain.com/v2/app/loginApi/[API_KEY]/2?token= [token]&host=[cname.yourdomain.com]"

sessionId#stringALWAYS

Eg"xxxxxxxxxxxxxxxxx"

{
  "error": false,
  "loginUrl": "https://cname.yourdomain.com/v2/app/loginApi/[API_KEY]/2?token= [token]&host=[cname.yourdomain.com]",
  "sessionId": "xxxxxxxxxxxxxxxxx"
}

Errors#

Fix the request02

400Fix the request
Invalid request. Check required parameters, body fields, file format, pagination values, and ObjectId values.
401Fix the request
Missing, invalid, expired, or insufficient API key/token. Older permission middleware may also return 401 for missing permissions.

Fix the data01

404Fix the data
The requested resource, route, community, channel, user, API key, status, or job was not found.

Retry with backoff01

500Retry with backoff
Unexpected Returning.AI service error.
{
  "status": "fail",
  "message": "Invalid request. Check required parameters, body fields, file format, pagination values, and ObjectId values."
}

Next step#

Register user with passwordPOST/auth/register