Hanzo
OpenapiIam

Records a sign-in.

Records a sign-in. Signing in again from another browser adds to the session rather than replacing it, so one person can be signed in from a laptop and a…

POST /v1/iam/sessions/create

Addresshttps://api.hanzo.ai/v1/iam/sessions/create
MethodPOST
OperationcreateSession
AuthAuthorization: Bearer $HANZO_API_KEY

Records a sign-in. Signing in again from another browser adds to the session rather than replacing it, so one person can be signed in from a laptop and a phone at once.

Ask for an exclusive sign-in and the opposite holds: the new sign-in is the only one left and every other browser is signed out. That is the setting to use when one person may hold only one live session at a time.

Request

5 fields, body application/json (required).

FieldInTypeRequiredDescription
applicationbodystringyes
exclusiveSigninbodyboolean
namebodystringyes
ownerbodystringyes
sessionIdbodystring[]

Response

StatusBodyMeaning
200iam.Sessionok

200 body — 10 fields.

FieldInTypeAlwaysDescription
applicationbodystring
createdAtbodystring (date-time)
createdTimebodystring
deletedbodyboolean
exclusiveSigninbodybooleanExclusiveSignin is a transient control flag (v1 xorm:"-"): a caller sets it on a create to collapse SessionId down to the single incoming cookie instead of…
idbodystring
namebodystring
ownerbodystring
sessionIdbodystring[]
updatedAtbodystring (date-time)

Failure carries the platform error shape — see Errors.

Examples

hanzo iam sessions create \
  --application <application> \
  --name <name> \
  --owner <owner>

IAM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page