Create a session with email and password

Creates a session with a specified email and password.

Request
Request Body schema: application/json

Sign in resource.

email
required
string

Email.

password
required
string <password>

Password.

oneTimePassword
string^[0-9]{6}$

One time password for 2 factor authentication. Should contain digits only.

expiredTime
string <date-time>

Session expired time. Defaults to one hour.

Responses
201

Session created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
permissions
required
Array of strings <operationId>

Permissions of the session. See the format in example. Use wildcard * for full access.

id
string <= 50 characters

ID of the session.

token
string

Authentication token of the session.

Array of objects (Membership)

Organizations of which the user is a member.

Array
required
object

Organization membership.

required
object

Membership user.

allowedIps
Array of strings or null <ip> (AllowedIps)

List of IP addresses that are permitted access. Private subnets are prohibited. To remove restrictions, set this value to null.

permissions
Array of strings <operationId>

Permissions that the user has within the organization. Use the wildcard character * for full access.

isOwner
boolean

Specifies whether the user is the owner of the organization.

isDefault
boolean

Specifies whether the organization is the default organization for the user.

roleIds
Array of strings

Role IDs associated with the user. Role IDs specify the roles that the user performs within the organization. For example, the user may be an organization admin.

Array of objects (Self) non-empty

Related links.

userId
string <= 50 characters

ID of the user.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

expiredTime
string <date-time>

Date and time when the session expired. Defaults to one hour.

Array of objects (Self) non-empty

Related links.

Array (non-empty)
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

post/signin
Request samples
application/json
{
  • "email": "email@example.com",
  • "password": "pa$$word",
  • "oneTimePassword": "123456",
  • "expiredTime": "2019-08-24T14:15:22Z"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "token": "string",
  • "permissions": [
    ],
  • "memberships": [
    ],
  • "userId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "expiredTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}