<!-- https://staircase.co/delivery/distribution/access -->
# Access

# Access

Identity, single sign-on, API-key issuance and credential storage, with a stated boundary on who can reach a customer environment.

All product access control is by API key, and every environment has one. Access creates and manages the root identity that owns a company, the user identities belonging to its organisations, organisation parameters and credentials, the credentials a lender supplies for its own vendor accounts, and key rotation.

Rotating a key takes two factors: the organisation owner's identity and the current key.

## How it works

Storage is split by what is being stored. API keys are held encrypted; user identities and their credentials sit in the managed identity service rather than in any product's own database. User identity is two-factor.

No API access is held into a customer's environment, with Health as the single exception, and nobody reaches an environment through the console. The boundary is stated in the design notes rather than implied.

Temporary maintenance access is possible and costs four independent factors: the environment's API key, a user identity, an approval from the security officer, and an approval from the organisation's own owner. The route runs through Comply, which issues the credential after the environment owner approves the request by email.

Product dependencies are expected to sit in the same environment, so a call does not cross an environment boundary to authenticate. Four products are the stated exceptions, because they are the ones that operate on environments rather than inside one.

## Operations

<!--source:api-specifications-->

### Account Partner Schema
<!--/source-->

`DELETE` `/`

<!--source:api-specifications-->

#### Delete Partner Schema
<!--/source-->

`delete_partner_schema`

<!--source:api-specifications-->
This service manages the deletion of a partner schema.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy .

```
{
 "partner": "foopartner",
 "product": "barproduct",
 "schema": {
 "price": 32,
 "product_name": "apple"
 }
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `partner`required | `string` | <!--source:api-specifications-->The name of the partner.<!--/source-->Example `foopartner` |
| `product`required | `string` | <!--source:api-specifications-->The name of the product.<!--/source-->Example `barproduct` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
201 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
409 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

`POST` `/`

<!--source:api-specifications-->

#### Create Partner Schema
<!--/source-->

`create_partner_schema`

<!--source:api-specifications-->
This service manages the creation of a partner schema.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy .

```
{
 "partner": "foopartner",
 "product": "barproduct",
 "schema": {
 "price": 32,
 "product_name": "apple"
 }
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `partner`required | `string` | <!--source:api-specifications-->The name of the partner.<!--/source-->Example `foopartner` |
| `product`required | `string` | <!--source:api-specifications-->The name of the product.<!--/source-->Example `barproduct` |
| `schema`required | `object` | <!--source:api-specifications-->The JSON schema.<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
201 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
409 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

`PUT` `/`

<!--source:api-specifications-->

#### Update Partner Schema
<!--/source-->

`update_partner_schema`

<!--source:api-specifications-->
This service manages the update of a partner schema.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy .

```
{
 "partner": "foopartner",
 "product": "barproduct",
 "schema": {
 "price": 32,
 "product_name": "apple"
 }
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `partner`required | `string` | <!--source:api-specifications-->The name of the partner.<!--/source-->Example `foopartner` |
| `product`required | `string` | <!--source:api-specifications-->The name of the product.<!--/source-->Example `barproduct` |
| `schema`required | `object` | <!--source:api-specifications-->The JSON schema.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
201 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
409 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message with details.<!--/source--> |

<!--source:api-specifications-->

### Company Organization
<!--/source-->

`GET` `/`

<!--source:api-specifications-->

#### Retrieve Company Organization List
<!--/source-->

`retrieve-company-organization-list`

<!--source:api-specifications-->
This service retrieves company organization list.

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `company_name` | `string` query | `Amazon` | <!--source:api-specifications-->Company name<!--/source--> |
| `organization_name` | `string` query | `Amazon Web Services` | <!--source:api-specifications-->Organization name<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successful Company Organization List Retrieve.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `company_organization_list` | `object[]` | <!--source:api-specifications-->Company organization list<!--/source--> |
| `organization_id` | `string` | <!--source:api-specifications-->Organization ID<!--/source--> |
| `company_name` | `string` | <!--source:api-specifications-->Company name<!--/source--> |
| `organization_name` | `string` | <!--source:api-specifications-->Organization name<!--/source--> |

##### Other responses

`400``403`

`GET` `/{organization_id}`

<!--source:api-specifications-->

#### Retrieve Company Organization
<!--/source-->

`retrieve-company-organization`

<!--source:api-specifications-->
This service retrieves company organization.

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `organization_id` required | `string` path | `fxfxfxfx-fxfx-fxfx-fxfx-fxfxfxfxfxfx` | <!--source:api-specifications-->Organization ID<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successful Company Organization Retrieve.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `company_organization` | `object` | <!--source:api-specifications-->Company organization object<!--/source--> |
| `organization_id` | `string` | <!--source:api-specifications-->Organization ID<!--/source--> |
| `company_name` | `string` | <!--source:api-specifications-->Company name<!--/source--> |
| `organization_name` | `string` | <!--source:api-specifications-->Organization name<!--/source--> |

##### Other responses

`400``403``404`

<!--source:api-specifications-->

### Access Invitations
<!--/source-->

`POST` `/{application_name}/invitations`

<!--source:api-specifications-->

#### Invite User
<!--/source-->

`inviteUser`

<!--source:api-specifications-->
Invites a new user.

Invitation will redirect user to the provided URL on acceptance. Upon acceptance, the user will be redirected to the provided URL with a fragment parameters:

`staircase_product=Access` `action=ACCEPT_INVITATION` and `result` containing on of the following values:

- `ACCEPTED`,- User accepted the invitation
- `BAD_REQUEST`,- Bad request, one of the required parameters is missing
- `UNKNOWN_ERROR`,- Unknown error occurred
- `INVITATION_NOT_FOUND`,- Invitation not found. Could be expired or invalid code
- `INVITATION_NOT_VALID`,- Invitation not valid. Could be already accepted or expired
- `INTERNAL_SERVER_ERROR`,- Internal server error occurred

The invitation URL will be valid for 1 month.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "email": "johndoe@email.com",
 "redirect_url": "https://webhook.site/d9b8f770-38c2-4584-8944-0b7194d203e8?guid=123"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
[
 {
 "email": "johndoe@email.com",
 "invitation_url": "https://cerf-dev.staircaseapi.com/access/invitation-accept?code=c6d0b273-5dd1-4819-9dd0-00e109a31723&redirect_url=https%3A//webhook.site/d9b8f770-38c2-4584-8944-0b7194d203e8%3Fguid%3D123"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API Key<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |
| `redirect_url` | `string` | <!--source:api-specifications-->URL to redirect user on invitation acceptance.<!--/source-->Example `https://webhook.site/d9b8f770-38c2-4584-8944-0b7194d203e8?guid=123` |

##### Response `201``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
OK Response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |
| `invitation_url` | `string` | <!--source:api-specifications-->URL to confirm the invitation.<!--/source-->Example `https://cerf-dev.staircaseapi.com/access/invitation-accept?code=c6d0b273-5dd1-4819-9dd0-00e109a31723&redirect_url=https%3A//webhook.site/d9b8f770-38c2-4584-8944-0b7194d203e8%3Fguid%3D123` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Email already registered
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`404`

<!--source:api-specifications-->

### Access Authorization
<!--/source-->

`POST` `/{application_name}/login`

<!--source:api-specifications-->

#### Access login
<!--/source-->

`getUserToken`

<!--source:api-specifications-->
Access login enables you to use your credentials to retrieve a valid access_token, id_token, token_type, refresh_token. X-API-KEY is not required for this endpoint.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "email": "johndoe@email.com",
 "password": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "refresh_token": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "id_token": "<redacted>",
 "access_token": "<redacted>",
 "token_type": "Bearer",
 "expires_in": "86400"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |
| `password` | `string (password)` | <!--source:api-specifications-->User password.<!--/source-->Example `<redacted>` |

##### Response `200``application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `refresh_token` | `string` | <!--source:api-specifications-->The refresh token.<!--/source-->Example `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |
| `id_token` | `string` | <!--source:api-specifications-->Temporary id token obtained.<!--/source-->Example `<redacted>` |
| `access_token` | `string` | <!--source:api-specifications-->Temporary access token obtained.<!--/source-->Example `<redacted>` |
| `token_type` | `string` | <!--source:api-specifications-->The token type.<!--/source-->Example `Bearer` |
| `expires_in` | `string` | <!--source:api-specifications-->The expiration period of the authentication result in seconds.<!--/source-->Example `Bearer <redacted>` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`POST` `/{application_name}/resend-activation`

<!--source:api-specifications-->

#### Resend activation email
<!--/source-->

`resendActivation`

<!--source:api-specifications-->
This endpoint enables you to resend email to activate your account in case you didn't receive it from the first time. X-API-KEY is not required for this endpoint.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "email": "johndoe@email.com"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "Activation email is resented"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Resented successfully.<!--/source-->Example `Activation email is resented` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User already confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`POST` `/{application_name}/change-password`

<!--source:api-specifications-->

#### Change password
<!--/source-->

`changePassword`

<!--source:api-specifications-->
Change user password using access token. Access token can be received by this endpoint Access Login. Important Note, this endpoint does not work with SSO users.
X-API-KEY is not required for this endpoint.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "old_password": "164f8UY=oj!",
 "new_password": "154fFV0=091"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Password changed

```
[
 {
 "message": "Password has been successfully changed"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained login service.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `old_password` | `string` | <!--source:api-specifications-->Current user password.<!--/source-->Example `164f8UY=oj!` |
| `new_password` | `string` | <!--source:api-specifications-->New user password.<!--/source-->Example `164f8UY=oj!` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Password changed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Password changed<!--/source-->Example `Password has been successfully changed` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`POST` `/{application_name}/sign-out`

<!--source:api-specifications-->

#### Sign out
<!--/source-->

`signOut`

<!--source:api-specifications-->
Proceed user sign out using access token. Access token can be received by this endpoint Access Login. X-API-KEY is not required for this endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Sign out

```
[
 {
 "message": "Sign out succeeded"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained login service.<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Sign out
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Password changed<!--/source-->Example `Sign out succeeded` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`GET` `/{application_name}/sign-out-by-cookie`

<!--source:api-specifications-->

#### Sign out by cookie
<!--/source-->

`signOutByCookie`

<!--source:api-specifications-->
This endpoint is meant to be visited by the user directly and should not be used with XHR requests. When accessed properly, the user will be correctly redirected, and all their tokens will be invalidated. This endpoint allows users to sign out using their access token stored in cookies.

Access Token Cookie: __sc.acact ID Token Cookie: __sc.acidt

Important Notes

Do Not Use with XHR Requests: This endpoint is designed for direct user interaction and should not be accessed through XHR requests. Token Invalidation: Upon successful logout, all user tokens will be invalidated. Redirection: If the logout is successful, the user will be redirected to the specified logout_uri. If the logout fails, the user will be redirected to the redirected_uri.

Usage

Ensure Cookies Are Set: The following cookies must be present: __sc.acact (Access Token) __sc.acidt (ID Token) Access Token: Can be received from the Access Login endpoint. No X-API-KEY Required: This endpoint does not require the X-API-KEY header.

<!--/source-->

##### Response

<!--source:api-specifications-->
302400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Sign out

```
[
 {
 "message": "Sign out succeeded"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |

##### Response `302``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Sign out
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Password changed<!--/source-->Example `Sign out succeeded` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`POST` `/{application_name}/forgot-password`

<!--source:api-specifications-->

#### Forgot password
<!--/source-->

`forgotPassword`

<!--source:api-specifications-->
Forgot password endpoint sends link on user's email address to reset password. Important Note, this endpoint does not work with SSO users.
X-API-KEY is not required for this endpoint.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "email": "johndoe@email.com"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
202400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Forgot password

```
[
 {
 "message": "Email sent"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |

##### Response `202``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Forgot password
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Password changed<!--/source-->Example `Email sent` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`404`

`POST` `/{application_name}/confirm-code`

<!--source:api-specifications-->

#### Confirm forgot password
<!--/source-->

`confirmForgotPassword`

<!--source:api-specifications-->
Confirm forgot password endpoint change user password using confirmation code retrieved by Forgot password. Important Note, this endpoint does not work with SSO users.
X-API-KEY is not required for this endpoint.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "email": "johndoe@email.com",
 "confirmation_code": "255252",
 "new_password": "P@ssword"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Confirm forgot password

```
[
 {
 "message": "Password changed"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |
| `confirmation_code` | `string` | <!--source:api-specifications-->Code retrieved by email.<!--/source-->Example `255252` |
| `new_password` | `string` | <!--source:api-specifications-->New user password.<!--/source-->Example `P@ssword` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Confirm forgot password
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Password changed<!--/source-->Example `Password changed` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`404`

`POST` `/{application_name}/refresh-token`

<!--source:api-specifications-->

#### Refresh Token
<!--/source-->

`refreshToken`

<!--source:api-specifications-->
Refresh Token allows you to refresh access token. X-API-KEY is not required for this endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "id_token": "<redacted>",
 "access_token": "<redacted>",
 "token_type": "Bearer",
 "expires_in": "86400"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Refresh token, obtained by login service.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `id_token` | `string` | <!--source:api-specifications-->Temporary id token obtained.<!--/source-->Example `<redacted>` |
| `access_token` | `string` | <!--source:api-specifications-->Temporary access token obtained.<!--/source-->Example `<redacted>` |
| `token_type` | `string` | <!--source:api-specifications-->The token type.<!--/source-->Example `Bearer` |
| `expires_in` | `string` | <!--source:api-specifications-->The expiration period of the authentication result in seconds.<!--/source-->Example `Bearer <redacted>` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`POST` `/{application_name}/validate-token`

<!--source:api-specifications-->

#### Validate Access Token
<!--/source-->

`validateAccessToken`

<!--source:api-specifications-->
Validate Access Token endpoint. X-API-KEY is not required for this endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
{
 "message": "Token is valid"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Access token, obtained by login service.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message.<!--/source-->Example `Token is valid` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

<!--source:api-specifications-->

### Access User
<!--/source-->

`POST` `/{application_name}/users`

<!--source:api-specifications-->

#### Create User
<!--/source-->

`createUser`

<!--source:api-specifications-->
Creates a new user. X-API-KEY is not required for this endpoint.

This endpoint will create a new user and send a confirmation email to the user.

Before creating a new user, user can be invited using the invitation endpoint. If invitation was accepted, the user will be created and confirmed automatically.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "email": "johndoe@email.com",
 "password": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
[
 {
 "id": "978412689485",
 "email": "johndoe@email.com",
 "status": "CONFIRMED"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API Key<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |
| `password` | `string (password)` | <!--source:api-specifications-->Password for the new user.<!--/source-->Example `<redacted>` |

##### Response `201``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
OK Response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | <!--source:api-specifications-->User id.<!--/source-->Example `64564689894561` |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |
| `status` | `string` | <!--source:api-specifications-->Status of the user CONFIRMED or UNCONFIRMED.<!--/source-->`CONFIRMED``UNCONFIRMED`Example `CONFIRMED` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Email already registered
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`GET` `/users`

<!--source:api-specifications-->

#### List users
<!--/source-->

`listUserInfo`

<!--source:api-specifications-->
List Users Info
<!--/source-->

<!--source:api-specifications-->
List users information by email. In case query parameter has some special characters such '+' or '/' it must be encoded. X-API-KEY is not required for this endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
[
 {
 "users": [
 {
 "id": "f5fa64a9-51b6-41c3-b22e-fd8d7b1dadb2",
 "email": "example@email.com",
 "user_creation_date": "2023-10-13T11:32:06.637000+00:00",
 "user_last_modified_date": "2023-10-13T11:57:36.835000+00:00",
 "person_identifier": "01H84EDXPD3PBH21DGDQFZP06Y",
 "company_identifier": "01HCHKS73ME9A9W7XGDTX9Z9PC",
 "status": "CONFIRMED"
 }
 ],
 "next_token": null
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `email` | `string (email)` query | `example@email.com` | <!--source:api-specifications-->User email to query.<!--/source--> |
| `next_token` | `string` query | `CAISqQIIARKCAggDEv0BAAzZDJsxrI3ydVKVDZyI4WtUDKZt1d0R6fu+3POnqFCKeyJAbiI6IlBhZ2luYXRpb25Db250aW51YXRpb25EVE8iLCJuZXh0S2V5IjoiQUFBQUFBQUFBcnhoQVFFQmNFZEVNcVZrUzFDV1ZtWTlyYjM4NEsxM0VnY2psRW5VdXhNL3hqbFR0dHRsYm1ZN05qSm1aV1ZoWm1ZdE0yUXdNUzAwTTJOa0xXSTBabVV0WlRoa04yRTFPRFF3TXpkbE93PT0iLCJwYWdpbmF0aW9uRGVwdGgiOjI1LCJwcmV2aW91c1JlcXVlc3RUaW1lIjoxNjk4MjE5OTIxNDE2fRogIRzi3AAH44NsO9VRPe6wxirYfEjiup4H6OAJ2P6ULL8=` | <!--source:api-specifications-->next_token.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
OK Response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `users` | `object[]` | <!--source:api-specifications-->Users data.<!--/source--> |
| `id` | `string` | <!--source:api-specifications-->User id.<!--/source-->Example `64564689894561` |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |
| `user_creation_date` | `string` | <!--source:api-specifications-->User creation date.<!--/source-->Example `2023-10-13T11:32:06.637000+00:00` |
| `user_last_modified_date` | `string` | <!--source:api-specifications-->User last modified date.<!--/source-->Example `2023-10-13T11:32:06.637000+00:00` |
| `person_identifier` | `string` | <!--source:api-specifications-->Staircase global person ID.<!--/source-->Example `01GYCBKPSMTJYJR1PG9JS37FTE` |
| `company_identifier` | `string` | <!--source:api-specifications-->Staircase global company ID.<!--/source-->Example `01GYCBKPSMTJYJR1PG9JS37FTE` |
| `status` | `string` | <!--source:api-specifications-->Status of the user.<!--/source-->Example `CONFIRMED` |
| `next_token` | `string` | <!--source:api-specifications-->next_token.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`GET` `/{application_name}/users/{user_id}`

<!--source:api-specifications-->

#### Get User
<!--/source-->

`getUser`

<!--source:api-specifications-->
Get user endpoint. X-API-KEY is not required for this endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
[
 {
 "id": "978412689485",
 "email": "johndoe@email.com",
 "person_identifier": "01GYCBKPSMTJYJR1PG9JS37FTE",
 "company_identifier": null,
 "status": "CONFIRMED"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |
| `user_id` required | `string` path | `856451298456123` | <!--source:api-specifications-->User id to query.<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API Key<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->
<!--source:api-specifications-->
OK Response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | <!--source:api-specifications-->User id.<!--/source-->Example `64564689894561` |
| `email` | `string (email)` | <!--source:api-specifications-->Email of the user.<!--/source-->Example `johndoe@email.com` |
| `person_identifier` | `string` | <!--source:api-specifications-->Staircase global person ID.<!--/source-->Example `01GYCBKPSMTJYJR1PG9JS37FTE` |
| `company_identifier` | `string` | <!--source:api-specifications-->Staircase global company ID.<!--/source-->Example `01GYCBKPSMTJYJR1PG9JS37FTE` |
| `status` | `string` | <!--source:api-specifications-->Status of the user.<!--/source-->Example `CONFIRMED` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`GET` `/user-info`

<!--source:api-specifications-->

#### Get User Info
<!--/source-->

`getUserInfo`

<!--source:api-specifications-->
Get user information using access token. Access token can be received by this endpoint Access Login. X-API-KEY is not required for this endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
[
 {
 "communications": [
 {
 "@id": "01GZP2AQ2JKPZXSXMJ1CA4TD3N",
 "@type": "person",
 "domain_name": "email.co",
 "website": "staircase.co"
 },
 {
 "@id": "01GZP2AQ2JKPZXSXMJ1CA4TD3N",
 "@type": "person",
 "email_address": "email@example.com"
 }
 ],
 "companies": [
 {
 "@id": "01H1XQHK0WWMX23XDX1GX3MCKR",
 "@type": "company",
 "company_identifier": "27374737",
 "has_communication_method": "01GZP2AQ2JKPZXSXMJ1CA4TD3N",
 "name": "Staircase Company"
 }
 ],
 "people": [
 {
 "@id": "01GZP2AQ2JKPZXSXMJ1CA4TD3N",
 "@type": "person",
 "has_communication_method": "01GZP2AQ2JKPZXSXMJ1CA4TD3N",
 "person_identifier": "112557303379029896330"
 }
 ]
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained by login service.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`200``204``401``404`

<!--source:api-specifications-->

### Access Applications
<!--/source-->

`GET` `/applications`

<!--source:api-specifications-->

#### List applications
<!--/source-->

`listApplications`

<!--source:api-specifications-->
List Applications
<!--/source-->

<!--source:api-specifications-->
List applications endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
{
 "result": [
 {
 "application_name": "test-user-pool-client-comply",
 "redirect_uri": "https://test.test.com/access/callback",
 "logout_uri": "https://test.test.com/access/callback"
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK Response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `result` | `object[]` | <!--source:api-specifications-->Array of applications<!--/source--> |
| `application_name` | `string` | <!--source:api-specifications-->Application name.<!--/source-->Example `access` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Application not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`POST` `/applications`

<!--source:api-specifications-->

#### Create application
<!--/source-->

`createApplication`

<!--source:api-specifications-->
Create Application
<!--/source-->

<!--source:api-specifications-->
Creates a new application.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "application_name": "access",
 "redirect_uri": "https://test.test.com/access/callback"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
[
 {
 "message": "Application access created successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `application_name`required | `string` | <!--source:api-specifications-->Application name.<!--/source-->Example `access` |
| `redirect_uri`required | `string` | <!--source:api-specifications-->Redirect_uri.<!--/source-->Example `https://test.test.com/access/callback` |
| `logout_uri` | `string` | <!--source:api-specifications-->Logout_uri.<!--/source-->Example `https://test.test.com/access/callback` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK Response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Success message.<!--/source-->Example `Application access created successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`PUT` `/applications/{application_name}`

<!--source:api-specifications-->

#### Update application
<!--/source-->

`updateApplication`

<!--source:api-specifications-->
Update Application
<!--/source-->

<!--source:api-specifications-->
Updates existing application.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "application_name": "access",
 "redirect_uri": "https://test.test.com/access/callback"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html404
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
[
 {
 "message": "Application access updated successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy App not found

```
[
 {
 "error": "Application access not found"
 }
]
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name to delete.<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API Key<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `redirect_uri`required | `string` | <!--source:api-specifications-->Redirect_uri.<!--/source-->Example `https://test.test.com/access/callback` |
| `logout_uri` | `string` | <!--source:api-specifications-->Logout_uri.<!--/source-->Example `https://test.test.com/access/callback` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK Response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Success message.<!--/source-->Example `Application access created successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
App not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/applications/{application_name}`

<!--source:api-specifications-->

#### Get Application
<!--/source-->

`getApplication`

<!--source:api-specifications-->
Get application endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK Response

```
[
 {
 "application_name": "access",
 "redirect_uri": "https://test.test.com/access/callback",
 "logout_uri": "https://test.test.com/access/callback"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name to get.<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API Key<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
OK Response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `application_name` | `string` | <!--source:api-specifications-->Application name.<!--/source-->Example `access` |
| `redirect_uri` | `string` | <!--source:api-specifications-->Redirect_uri.<!--/source-->Example `https://test.test.com/access/callback` |
| `logout_uri` | `string` | <!--source:api-specifications-->Logout_uri.<!--/source-->Example `https://test.test.com/access/callback` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Application not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`DELETE` `/applications/{application_name}`

<!--source:api-specifications-->

#### Delete Application
<!--/source-->

`deleteApplication`

<!--source:api-specifications-->
Delete application endpoint.

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name to delete.<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API Key<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Application not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`204`

<!--source:api-specifications-->

### Authorization
<!--/source-->

`POST` `/authorize`

<!--source:api-specifications-->

#### Authorization
<!--/source-->

`authorization`

<!--source:api-specifications-->
Makes an authorization decision about a service request described in the parameters. The decision is based on the policies stored in the policy store.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "policy_store_id": "DxK7hSQRzYWoCGSeumNvm",
 "principal": {
 "entityType": "ExampleCo::Loan::Borrower",
 "entityId": "Steve"
 },
 "action": {
 "actionType": "ExampleCo::Loan::Action",
 "actionId": "GetListingInfo"
 },
 "resource": {
 "entityType": "ExampleCo::Loan::Listing",
 "entityId": "12345"
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully authorized.

```
{
 "decision": "ALLOW",
 "determining_policies": [
 {
 "policyId": "WVKdXE7dNDJNRXYVAdCJmd"
 }
 ],
 "errors": []
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `policy_store_id`required | `string` | <!--source:api-specifications-->ID of the policy store.<!--/source-->Example `Dc3v9eLa2UbfCrw6wrkcmK` |
| `principal` | `object` | <!--source:api-specifications-->Principal of the policy.<!--/source--> |
| `entityType`required | `string` | <!--source:api-specifications-->Entity type of the principal.<!--/source-->Example `loan::borrower` |
| `entityId`required | `string` | <!--source:api-specifications-->Entity ID of the principal.<!--/source-->Example `john` |
| `action` | `object` | <!--source:api-specifications-->Action of the policy.<!--/source--> |
| `actionType`required | `string` | <!--source:api-specifications-->Type of the action.<!--/source-->Example `loan::Action` |
| `actionId`required | `string` | <!--source:api-specifications-->ID of the action.<!--/source-->Example `GetListingInfo` |
| `resource` | `object` | <!--source:api-specifications-->Resource of the policy.<!--/source--> |
| `entityType`required | `string` | <!--source:api-specifications-->Entity type of the resource.<!--/source-->Example `loan::preapprovallist` |
| `entityId`required | `string` | <!--source:api-specifications-->Entity ID of the resource.<!--/source-->Example `johnlist` |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Successfully authorized.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `decision`required | `string` | <!--source:api-specifications-->Decision of the authorization.<!--/source-->`ALLOW``DENY` |
| `determining_policies`required | `object[]` | <!--source:api-specifications-->The list of determining policies used to make the authorization decision.<!--/source--> |
| `errors`required | `string[]` | <!--source:api-specifications-->Errors that occurred while making an authorization decision.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

<!--source:api-specifications-->

### Site Logs Configurations
<!--/source-->

`POST` `/configurations`

<!--source:api-specifications-->

#### Save Configuration
<!--/source-->

`saveConfiguration`

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "configuration_id": "8237fc96-0d4a-484c-b2e3-ffd0f800eae1"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Success response

```
{
 "foo": "bar"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Container not found"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `configuration_id`required | `string` | <!--source:api-specifications-->Simple Site Configuration ID<!--/source-->Example `8237fc96-0d4a-484c-b2e3-ffd0f800eae1` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Other responses

`200`

`GET` `/configurations`

<!--source:api-specifications-->

#### List Configurations
<!--/source-->

`listConfigurations`

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy List Configurations

```
{
 "domain_name": "abc.cloudfront.net",
 "configuration_id": "8237fc96-0d4a-484c-xx-xxx",
 "distribution_id": "E23M6IP4FJ0xxxx"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Container not found"
}
```

<!--/source-->

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
List Configurations
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `domain_name` | `string` | <!--source:api-specifications-->Domain Name<!--/source-->Example `foo` |
| `configuration_id` | `string` | <!--source:api-specifications-->Configuration ID<!--/source-->Example `configuration-id` |
| `distribution_id` | `string` | <!--source:api-specifications-->Distribution ID<!--/source-->Example `distribution-id` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

<!--source:api-specifications-->

### Account configurations
<!--/source-->

`POST` `/create-configurations`

<!--source:api-specifications-->

#### Create Configurations
<!--/source-->

`store_new_environment_configurations`

<!--source:api-specifications-->
Configurations are used to change a product behavior for one or multiple customers' accounts, this will enable Staircase default configurations, and the customer can change as needed in his account.

The account data bundle enables the customer environment with Staircase default configurations for products like Suite.

Example of configurations:

- Allow multiple registration = true|false

- Borrower flow enabled = true|false

- Data manager flow enabled = true|false

<!--/source-->

##### Request

<!--source:api-specifications-->
Example configurationExample without environment
<!--/source-->

<!--source:api-specifications-->
application/json Copy .

```
{
 "environment": "account.staircaseapi.com",
 "product": "myProduct",
 "configurations": [
 {
 "key": "server_domain",
 "value": "myserver.com"
 },
 {
 "key": "server_key",
 "value": "fxfxfxfxfxfx"
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy .

```
{
 "product": "myProduct",
 "configurations": [
 {
 "key": "server_domain",
 "value": "myserver.com"
 },
 {
 "key": "server_key",
 "value": "fxfxfxfxfxfx"
 }
 ]
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400409500
<!--/source-->

<!--source:api-specifications-->
application/json Copy 201 response.

```
{
 "message": "Configurations were created successfully."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response.

```
{
 "message": "Invalid body JSON."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 409 response.

```
{
 "message": "This resource was already previously created. Please, use the update endpoint."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 500 response.

```
{
 "message": "Internal server error"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environment` | `string` | <!--source:api-specifications-->The environment hosts.<!--/source-->Example `account.staircaseapi.com` |
| `product`required | `string` | <!--source:api-specifications-->The product to be configured.<!--/source-->Example `newProduct` |
| `configurations` | `object[]` | <!--source:api-specifications-->The product configurations.<!--/source--> |
| `key` | `string` | <!--source:api-specifications-->Key<!--/source--> |
| `value` | `string` | <!--source:api-specifications-->Key<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
201 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configurations were created successfully.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Invalid body JSON.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
409 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The resource was already previously created.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
500 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

`GET` `/retrieve-configurations`

<!--source:api-specifications-->

#### Retrieve Configurations
<!--/source-->

`retrieve_configurations`

<!--source:api-specifications-->
This service retrieves configurations from a product and/or environment. If no query string parameters are passed then the response should contain configurations that have been registered. Configurations from master environment registered will be retrieved as well, all global and local credentials for the given inputs.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy 200 response.

```
[
 {
 "environment": "account.staircaseapi.com",
 "product": "myProduct",
 "is_local": true,
 "created_at": "2011-10-05T14:48:00.000",
 "updated_at": "2011-10-05T14:48:00.000",
 "created_by_environment": "account.staircaseapi.com",
 "configurations": [
 {
 "key": "server_domain",
 "value": "myserver.com"
 },
 {
 "key": "server_key",
 "value": "fxfxfxfxfxfx"
 }
 ]
 },
 {
 "environment": "test.staircaseapi.com",
 "product": "myProduct",
 "is_local": false,
 "created_at": "2011-10-05T14:48:00.000",
 "updated_at": "2011-10-05T14:48:00.000",
 "created_by_environment": "test.staircaseapi.com",
 "configurations": [
 {
 "key": "ttl",
 "value": 20
 }
 ]
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response.

```
{
 "message": "\"Invalid json body.\""
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 404 response.

```
{
 "message": "No one configurations were found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 500 response.

```
{
 "message": "Internal server error"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
4
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |
| `environment` | `string` query | `account.staircaseapi.com` | <!--source:api-specifications-->The environment host, configurations without environment will be retrieved if this filter is not input.<!--/source--> |
| `product` | `string` query | `newService` | <!--source:api-specifications-->Product to retrieve configurations.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
7 fields
<!--/source-->
<!--source:api-specifications-->
200 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environment` | `string` | <!--source:api-specifications-->The environment hosts.<!--/source-->Example `account.staircaseapi.com` |
| `product` | `string` | <!--source:api-specifications-->The product to be configured.<!--/source-->Example `newProduct` |
| `created_at` | `string` | <!--source:api-specifications-->Date that it was created.<!--/source-->Example `2011-10-05T14:48:00.000` |
| `updated_at` | `string` | <!--source:api-specifications-->Date that it was updated.<!--/source-->Example `2011-10-05T14:48:00.000` |
| `created_by_environment` | `string` | <!--source:api-specifications-->Name of environment responsible to create it.<!--/source-->Example `2011-10-05T14:48:00.000` |
| `is_local` | `boolean` | <!--source:api-specifications-->Indicates if the configuration was created by the local environment.<!--/source-->Example `true` |
| `configurations` | `object[]` | <!--source:api-specifications-->The product configurations.<!--/source--> |
| `key` | `string` | — |
| `value` | `—` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
404 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
500 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

`PUT` `/update-configurations`

<!--source:api-specifications-->

#### Update Configurations
<!--/source-->

`update_environment_configurations`

<!--source:api-specifications-->
This service update product configurations. Configurations are used to change a product behavior.

<!--/source-->

##### Request

<!--source:api-specifications-->
Example configurationExample without environment
<!--/source-->

<!--source:api-specifications-->
application/json Copy .

```
{
 "environment": "account.staircaseapi.com",
 "product": "myProduct",
 "configurations": [
 {
 "key": "server_domain",
 "value": "myserver.com"
 },
 {
 "key": "server_key",
 "value": "fxfxfxfxfxfx"
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy .

```
{
 "product": "myProduct",
 "configurations": [
 {
 "key": "server_domain",
 "value": "myserver.com"
 },
 {
 "key": "server_key",
 "value": "fxfxfxfxfxfx"
 }
 ]
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy 201 response.

```
{
 "message": "Configurations were updated successfully."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response.

```
{
 "message": "Invalid body JSON."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 404 response.

```
{
 "message": "No one local resource was found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 500 response.

```
{
 "message": "Internal server error"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environment` | `string` | <!--source:api-specifications-->The environment hosts.<!--/source-->Example `account.staircaseapi.com` |
| `product`required | `string` | <!--source:api-specifications-->The product to be configured.<!--/source-->Example `newProduct` |
| `configurations` | `object[]` | <!--source:api-specifications-->The product configurations.<!--/source--> |
| `key` | `string` | <!--source:api-specifications-->Key<!--/source--> |
| `value` | `string` | <!--source:api-specifications-->Value<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
201 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configurations were updated successfully.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Invalid body JSON.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
404 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
500 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

`DELETE` `/delete-configurations`

<!--source:api-specifications-->

#### Delete Configurations
<!--/source-->

`delete_environment_configurations`

<!--source:api-specifications-->
This service delete product configurations. Configurations are used to change a product behavior.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy 201 response.

```
{
 "message": "Configurations were deleted successfully."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response.

```
{
 "message": "Invalid body JSON."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 404 response.

```
{
 "message": "No one configurations were found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 500 response

```
{
 "message": "Internal server error"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `product` required | `string` query | `myProduct` | <!--source:api-specifications-->Product<!--/source--> |
| `environment` | `string` query | `account.staircaseapi.com` | <!--source:api-specifications-->Product<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
201 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configurations were deleted successfully.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Invalid body JSON.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
404 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
500 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

<!--source:api-specifications-->

### Customer
<!--/source-->

`POST` `/create-customer`

<!--source:api-specifications-->

#### Create Customer
<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

`GET` `/retrieve-customer`

<!--source:api-specifications-->

#### Retrieve Customer
<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |
| `customer_id` | `string` query | `ba4e8f60-f259-11eb-9a03-0242ac130003` | — |
| `email` | `string` query | `customer@domain.com` | — |

<!--source:api-specifications-->

### Account Partner
<!--/source-->

`POST` `/credentials`

<!--source:api-specifications-->

#### Register Credentials
<!--/source-->

`store_new_environment_credentials`

<!--source:api-specifications-->
This service manages data Partner Account credentials. Data partner credentials enable Staircase Mortgage products to securely connect with specific data partners. They authorize Staircase to send data partners requests and receive their responses, both of which are persisted in the customer’s dedicated account.

The Account data bundle automatically registers the Marketplace environment which includes all needed configurations and credentials to start using Staircase products in the customer environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy .

```
{
 "environment": "account.staircaseapi.com",
 "partner": "atomic",
 "type": "production",
 "credentials": {
 "login": "username",
 "password": "myPass"
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400
<!--/source-->

<!--source:api-specifications-->
application/json Copy 201 response.

```
{
 "message": "Credentials are encrypted and stored successfully."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response.

```
{
 "message": "error in creating Credentials credentials is a required field and it must be an array"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environment` | `string` | <!--source:api-specifications-->The environment host<!--/source-->Example `account.staircaseapi.com` |
| `partner`required | `string` | <!--source:api-specifications-->Partner Account.<!--/source-->Example `newService` |
| `product` | `string` | <!--source:api-specifications-->Product account.<!--/source-->Example `newProduct` |
| `credentials`required | `object` | <!--source:api-specifications-->Partner that the credentials is used<!--/source--> |
| `type` | `string` | <!--source:api-specifications-->Type can be production, test or empty<!--/source-->`production``test`Example `production` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
201 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Credentials are encrypted and stored successfully.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error in creating credentials.<!--/source--> |

`POST` `/upload-certificate/{partner}`

<!--source:api-specifications-->

#### Upload Certificate
<!--/source-->

`upload_partner_certificate`

<!--source:api-specifications-->
This service is used to generate a pre-signed URL to upload the partner certificate to Staircase cloud environment. The certificate will be securely stored and can be retrieved by the /retrieve-certificate endpoint

Note: This will NOT upload your certificate.

To upload the certificate file, you will need to issue a PUT request to the URL returned by the response body. See example, code snippet below:

```
# Upload Certificate to the presigned url
import requests

# For example, the presigned_url might look like this:
upload_presigned_url = ""

# Set the path to the file you want to upload
filepath = "certificate.pfx"
# Set the headers appropriately
headers = {
 'Content-Type': 'application/x-pkcs12'
}
# Read the file data and make the PUT request
with open(filepath, 'rb') as file:
 payload = file.read
 response = requests.put(url=upload_presigned_url, headers=headers, data=payload)
```

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy .

```
{
 "host": "account.staircaseapi.com"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400500
<!--/source-->

<!--source:api-specifications-->
application/json Copy 200 response

```
{
 "message": "Pre-signed url successfully generated",
 "host": "my_partner_host",
 "type": "production",
 "presigned_url": "https://my_partner-certificate-bucket.s3.amazonaws.com/"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response

```
{
 "message": "host must exist in body"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 500 response

```
{
 "message": "Internal server error"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |
| `partner` required | `string` path | `my_partner_name` | <!--source:api-specifications-->Partner Account.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `host`required | `string` | <!--source:api-specifications-->The environment host<!--/source-->Example `account.staircaseapi.com` |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
200 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Pre-signed URL successfully generated.<!--/source--> |
| `host` | `string` | <!--source:api-specifications-->host<!--/source--> |
| `presigned_url` | `string` | <!--source:api-specifications-->Pre-signed URL to upload file.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Bad request.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
500 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

`PUT` `/credentials`

<!--source:api-specifications-->

#### Update Credentials
<!--/source-->

`update_new_environment_credentials`

<!--source:api-specifications-->
This service updates existing data partner credentials. The password provided when creating the credentials must be supplied in the request body when calling this service.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy .

```
{
 "environment": "account.staircaseapi.com",
 "partner": "atomic",
 "product": "myProduct",
 "type": "production",
 "credentials": {
 "login": "username",
 "password": "<redacted>"
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy 200 response.

```
{
 "message": "Credentials are encrypted and updated successfully"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response.

```
{
 "message": "error in creating Credentials credentials is a required field and it must be an array"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 404 response.

```
{
 "message": "Credentials Not Found."
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environment` | `string` | <!--source:api-specifications-->The environment host<!--/source-->Example `account.staircaseapi.com` |
| `partner`required | `string` | <!--source:api-specifications-->Partner that the credentials is used<!--/source-->Example `newService` |
| `product` | `string` | <!--source:api-specifications-->Product account credentials.<!--/source-->Example `newProduct` |
| `credentials`required | `object` | <!--source:api-specifications-->Partner that the credentials is used<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
200 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Credentials are encrypted and updated successfully.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
404 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

`GET` `/retrieve-certificate/{partner}`

<!--source:api-specifications-->

#### Retrieve Certificate
<!--/source-->

`retrieve_partner_certificate`

<!--source:api-specifications-->
This service is used to generate a pre-signed URL to download the partner certificate from Staircase cloud environment. The certificate is securely stored and can be uploaded by the /upload-certificate endpoint

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy 200 response

```
{
 "message": "Pre-signed URL successfully generated",
 "presigned_url": "https://bucket.s3.amazonaws.com/my_partner/my_partner_host.pfx?AWSAccessKeyId=<redacted>&Signature=<redacted>&x-amz-security-token=<redacted>&Expires=111111"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response

```
{
 "message": "The partner path must exist. Please use /{partner}?host={host}"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 404 response

```
{
 "message": "Certificate not found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 500 response

```
{
 "message": "Internal server error"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
4
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `partner` required | `string` path | `my_partner_name` | <!--source:api-specifications-->Partner Account.<!--/source--> |
| `host` required | `string` query | `my_partner_host` | <!--source:api-specifications-->The host of the partner that was used to upload the certificate.<!--/source--> |
| `should_use_only_local_env` | `boolean` query | `true` | <!--source:api-specifications-->Define if it should only retrieve certificate from local environment and not master environment. (in any case, local environment has preference)<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
200 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Success message.<!--/source--> |
| `presigned_url` | `string` | <!--source:api-specifications-->The pre-signed URL used to retrieve the partner host certificate.<!--/source--> |
| `is_certificate_from_local_env` | `boolean` | <!--source:api-specifications-->Informs if the pre-signed URL was retrieved from local environment or master environment.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Bad request.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
404 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Certificate not found.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
500 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

`DELETE` `/credentials`

<!--source:api-specifications-->

#### Delete Credentials
<!--/source-->

`delete-delete-credentials`

<!--source:api-specifications-->
This service deletes all data partner and credentials that have been created for a specific environment or product locally.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403404
<!--/source-->

<!--source:api-specifications-->
application/json Copy 200 response

```
{
 "message": "Credentials are encrypted and stored successfully."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response

```
{
 "message": "f\"error in retrieving Credentials environment is a required field in the queryString\""
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 403 response

```
{
 "message": "error in retrieving Credentials Wrong Password"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 404 response

```
{
 "message": "Not Found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
7
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |
| `environment` | `string` query | `account.staircaseapi.com` | <!--source:api-specifications-->Environment<!--/source--> |
| `product` | `string` query | `newService` | <!--source:api-specifications-->Product to retrieve credentials.<!--/source--> |
| `partner` required | `string` query | `newService` | <!--source:api-specifications-->Partner Account.<!--/source--> |
| `type` | `string` query | `production` | <!--source:api-specifications-->Type can be production, test or empty<!--/source--> |
| `password` | `string` query | `<redacted>` | <!--source:api-specifications-->Password used to encrypt the Credentials<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
200 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The message.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
403 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
404 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

<!--source:api-specifications-->

### Account Customer
<!--/source-->

`POST` `/customer-accounts`

<!--source:api-specifications-->

#### Create Customer Account
<!--/source-->

`post-customer-accounts`

<!--source:api-specifications-->
Create Customer Account creates your account in Staircase. After successful account creation, an email containing an API key is sent to the email address you provided. Company Organizations:

Organizations help you group your accounts and environments, as you grow and scale with Staircase. Define a Company organization by going to the Add Company Organization service, after is created you can retrieve the company organization.

To obtain access to Staircase APIs in the documentation environment "api.staircase.co", activate your API Key in this link. Use your activated API Key to send requests to any product in the documentation.
<!--/source-->

##### Request

<!--source:api-specifications-->
Create AccountCreate Account with Organization
<!--/source-->

<!--source:api-specifications-->
application/json Copy Creates a customer account with required fields

```
{
 "first_name": "Vlad",
 "last_name": "Doe",
 "email": "vlad@example.com",
 "company_name": "DoeINC"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Creates a customer account with organization ID instead of Company Name

```
{
 "first_name": "Vlad",
 "last_name": "Doe",
 "email": "vlad@example.com",
 "organization_id": "fxfxfxfx-fxfx-fxfx-fxfx-fxfxfxfxfxfx"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Account creation successful.

```
{
 "first_name": "Vlad",
 "last_name": "Doe",
 "email": "vlad@example.com",
 "company_name": "DoeINC"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `first_name`required | `string` | <!--source:api-specifications-->Customer first name<!--/source-->Example `Alan` |
| `last_name`required | `string` | <!--source:api-specifications-->Customer last name<!--/source-->Example `Turing` |
| `email`required | `string` | <!--source:api-specifications-->Customer email address<!--/source-->Example `Alan.Turing@example.com` |
| `company_name`required | `string` | <!--source:api-specifications-->Public company name<!--/source-->Example `TuringINC` |
| `organization_id` | `string` | <!--source:api-specifications-->Organization ID<!--/source-->Example `fxfxfxfx-fxfxfx-fxfxfx-fxfxfxfx` |
| `callback_url` | `string` | <!--source:api-specifications-->URL address used to redirect the user to a webpage once its click on the confirmation button inside the welcome email. The confirmation_token used to confirm the email will be added on the query parameters in this URL.<!--/source-->Example `https://mydomain.com` |

##### Response `201``application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->
<!--source:api-specifications-->
Account creation successful.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `account_id`required | `string` | <!--source:api-specifications-->Account ID<!--/source-->Example `f2ee7908-daee-4da0-9cbe-f8dbcb9dab53` |
| `first_name`required | `string` | <!--source:api-specifications-->Customer first name<!--/source-->Example `Alan` |
| `last_name`required | `string` | <!--source:api-specifications-->Customer last name<!--/source-->Example `Turing` |
| `email`required | `string` | <!--source:api-specifications-->Customer email address<!--/source-->Example `Alan.Turing@example.com` |
| `company_name`required | `string` | <!--source:api-specifications-->Public company name<!--/source-->Example `TuringINC` |
| `organization_id` | `string` | <!--source:api-specifications-->Organization ID<!--/source-->Example `fxfxfxfx-fxfxfxfx-fxfxfxfx-fxfxfxfx` |

##### Other responses

`400``500`

`PUT` `/customer-accounts`

<!--source:api-specifications-->

#### Update Customer Account
<!--/source-->

`put-customer-accounts`

<!--source:api-specifications-->
Update Customer Account updates your account in Staircase. An organization can be added to the user by updating the organization_id field.
<!--/source-->

##### Request

<!--source:api-specifications-->
ExampleExample2
<!--/source-->

<!--source:api-specifications-->
application/json Copy Updates a customer account

```
{
 "account_key": "92e23b69-643c-453c-811d-ec2bc20a35e0",
 "first_name": "Vlad",
 "last_name": "Doe",
 "email": "vlad@example.com",
 "company_name": "DoeINC"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Updates a customer account with organization ID instead of Company Name

```
{
 "account_key": "92e23b69-643c-453c-811d-ec2bc20a35e0",
 "first_name": "Vlad",
 "last_name": "Doe",
 "email": "vlad@example.com",
 "organization_id": "fxfxfxfx-fxfx-fxfx-fxfx-fxfxfxfxfxfx"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Account creation successful.

```
{
 "first_name": "Vlad",
 "last_name": "Doe",
 "email": "vlad@example.com",
 "company_name": "DoeINC"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `account_key`required | `string` | <!--source:api-specifications-->API key associated to the user<!--/source-->Example `92e23b69-643c-453c-811d-ec2bc20a35e0` |
| `first_name` | `string` | <!--source:api-specifications-->Customer first name<!--/source-->Example `Alan` |
| `last_name` | `string` | <!--source:api-specifications-->Customer last name<!--/source-->Example `Turing` |
| `email` | `string` | <!--source:api-specifications-->Customer email address<!--/source-->Example `Alan.Turing@example.com` |
| `company_name` | `string` | <!--source:api-specifications-->Public company name<!--/source-->Example `TuringINC` |
| `organization_id` | `string` | <!--source:api-specifications-->Organization ID<!--/source-->Example `fxfxfxfx-fxfxfx-fxfxfx-fxfxfxfx` |

##### Response `200``application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->
<!--source:api-specifications-->
Account creation successful.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `account_id`required | `string` | <!--source:api-specifications-->Account ID<!--/source-->Example `f2ee7908-daee-4da0-9cbe-f8dbcb9dab53` |
| `first_name`required | `string` | <!--source:api-specifications-->Customer first name<!--/source-->Example `Alan` |
| `last_name`required | `string` | <!--source:api-specifications-->Customer last name<!--/source-->Example `Turing` |
| `email`required | `string` | <!--source:api-specifications-->Customer email address<!--/source-->Example `Alan.Turing@example.com` |
| `company_name`required | `string` | <!--source:api-specifications-->Public company name<!--/source-->Example `TuringINC` |
| `organization_id` | `string` | <!--source:api-specifications-->Organization ID<!--/source-->Example `fxfxfxfx-fxfxfxfx-fxfxfxfx-fxfxfxfx` |

##### Other responses

`400`

`GET` `/organization-account`

<!--source:api-specifications-->

#### Retrieve Organization Account List
<!--/source-->

`get-retrieve-organization-account-list`

<!--source:api-specifications-->
This service retrieves a list of customer accounts associated with a Company organization, organizations are defined in the Company product.

Company Organizations:

Organizations help you group your accounts and environments, as you grow and scale with Staircase. Define a Company organization by going to the Add Company Organization service, after is created you can retrieve the company organization in this service.

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |
| `organization_id` required | `string` query | `fxfxfxfx-fxfx-fxfx-fxfx-fxfxfxfxfx` | <!--source:api-specifications-->The organization ID.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->
<!--source:api-specifications-->
Account retrieved successful.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `account_id`required | `string` | <!--source:api-specifications-->Account ID<!--/source-->Example `f2ee7908-daee-4da0-9cbe-f8dbcb9dab53` |
| `account_key`required | `string` | <!--source:api-specifications-->Account Key<!--/source-->Example `fxfxfxfx-fxfxfxfx-fxfxfxfx-fxfxfxfx` |
| `organization_id`required | `string` | <!--source:api-specifications-->Organization ID<!--/source-->Example `fxfxfxfx-fxfxfxfx-fxfxfxfx-fxfxfxfx` |
| `first_name`required | `string` | <!--source:api-specifications-->Customer first name<!--/source-->Example `Alan` |
| `last_name`required | `string` | <!--source:api-specifications-->Customer last name<!--/source-->Example `Turing` |
| `email`required | `string` | <!--source:api-specifications-->Customer email address<!--/source-->Example `Alan.Turing@example.com` |

##### Other responses

`400``401`

`POST` `/organization-account`

<!--source:api-specifications-->

#### Create Organization Account
<!--/source-->

`post-create-organization-account`

<!--source:api-specifications-->
Create Organization Account creates organization account in Staircase.
<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy Create using required fields

```
{
 "organization_id": "fxfxfxfx-fxfxfxfx-fxfxfxfx-fxfxfxfx"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Account creation successful.

```
{
 "first_name": "Vlad",
 "last_name": "Doe",
 "email": "vlad@example.com",
 "company_name": "DoeINC"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `organization_id`required | `string` | <!--source:api-specifications-->Organization ID<!--/source-->Example `fxfxfxfx-fxfxfxfx-fxfxfxfx-fxfxfxfx` |
| `first_name` | `string` | <!--source:api-specifications-->Customer first name<!--/source-->Example `Alan` |
| `last_name` | `string` | <!--source:api-specifications-->Customer last name<!--/source-->Example `Turing` |
| `email` | `string` | <!--source:api-specifications-->Customer email address<!--/source-->Example `Alan.Turing@example.com` |

##### Response `201``application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->
<!--source:api-specifications-->
Account creation successful.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `account_id`required | `string` | <!--source:api-specifications-->Account ID<!--/source-->Example `f2ee7908-daee-4da0-9cbe-f8dbcb9dab53` |
| `account_key`required | `string` | <!--source:api-specifications-->Account Key<!--/source-->Example `fxfxfxfx-fxfxfxfx-fxfxfxfx-fxfxfxfx` |
| `organization_id`required | `string` | <!--source:api-specifications-->Organization ID<!--/source-->Example `fxfxfxfx-fxfxfxfx-fxfxfxfx-fxfxfxfx` |
| `first_name`required | `string` | <!--source:api-specifications-->Customer first name<!--/source-->Example `Alan` |
| `last_name`required | `string` | <!--source:api-specifications-->Customer last name<!--/source-->Example `Turing` |
| `email`required | `string` | <!--source:api-specifications-->Customer email address<!--/source-->Example `Alan.Turing@example.com` |

##### Other responses

`400`

`POST` `/confirm-email`

<!--source:api-specifications-->

#### Confirm Customer Email
<!--/source-->

`post-confirm-email`

<!--source:api-specifications-->
This service confirms the customer email and return the user key.

A confirmation token must be provided. This confirmation token can be found on the query parameters of the confirmation button URL address on the email sent by Customer Creation service.

Once the customer email is confirmed, the service will continue to provide the user key in the response for 1 hour. After 1 hour, the user key will not be provided in the response anymore.
<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy Example of a successful email confirmation.

```
{
 "confirmation_token": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Email confirmed successful.

```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `confirmation_token` | `string` | <!--source:api-specifications-->A confirmation token. This confirmation token can be found on the query parameters of the confirmation button URL address on the email sent by Customer Creation service.<!--/source-->Example `<redacted>` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Email was already confirmed previously.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Email was already confirmed previously.<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Email confirmed successful.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `api_key` | `string` | <!--source:api-specifications-->User API key.<!--/source--> |

##### Other responses

`400`

`GET` `/retrieve-account`

<!--source:api-specifications-->

#### Retrieve Account
<!--/source-->

`retrieve_account`

<!--source:api-specifications-->
This service is used to retrieve account details by API_key

When a customer account is created, the API_key is send to the customer by email. This can be used on this service to retrieve the customer account details

<!--/source-->

##### Response

<!--source:api-specifications-->
200400500
<!--/source-->

<!--source:api-specifications-->
application/json Copy 200 response

```
{
 "account_id": "1f4bf452-1da2-8f6c-976c-8a779523156a",
 "company_name": "FoobarINC",
 "email": "example@email.com",
 "first_name": "John",
 "last_name": "Doe"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 400 response

```
{
 "message": "The query string parameter must contain the api_key parameter. Please use /retrieve-account?api_key=<redacted>"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 500 response

```
{
 "message": "Internal server error"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `api_key` required | `string` query | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->The api_key that was send to the customer upon account creation.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->
<!--source:api-specifications-->
200 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `account_id` | `string` | <!--source:api-specifications-->Account unique identifier.<!--/source--> |
| `company_name` | `string` | <!--source:api-specifications-->Customer account company name.<!--/source--> |
| `email` | `string` | <!--source:api-specifications-->Customer account email.<!--/source--> |
| `first_name` | `string` | <!--source:api-specifications-->Customer account first_name.<!--/source--> |
| `last_name` | `string` | <!--source:api-specifications-->Customer account last_name.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Bad request.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
500 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

<!--source:api-specifications-->

### Site Logs
<!--/source-->

`GET` `/marketing-logs`

<!--source:api-specifications-->

#### Get Site Logs
<!--/source-->

`getMarketingLogs`

<!--source:api-specifications-->
Get Marketing Logs
<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully get Marketing Logs.

```
{
 "foo": "bar"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Container not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `site_configuration_id` required | `string` query | `some-configuration-id` | <!--source:api-specifications-->Site Configuration ID<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Other responses

`200`

<!--source:api-specifications-->

### Policy Store
<!--/source-->

`POST` `/policy-store`

<!--source:api-specifications-->

#### Create Policy Store
<!--/source-->

`createPolicyStore`

<!--source:api-specifications-->
Creates a policy store. A policy store is a container for policies.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "description": "Example policy store"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully created policy store.

```
{
 "policy_store_id": "Dc3v9eLa2UbfCrw6wrkcmK"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `description`required | `string` | <!--source:api-specifications-->Description of the policy store.<!--/source-->Example `Example policy store` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successfully created policy store.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `policy_store_id`required | `string` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

`GET` `/policy-store`

<!--source:api-specifications-->

#### List Policy Stores
<!--/source-->

`listPolicyStore`

<!--source:api-specifications-->
List Policy Store
<!--/source-->

<!--source:api-specifications-->
List created policy stores. A policy store is a container for policies.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully get list of policy stores.

```
{
 "next_token": "AQICAHisuNZI1E/P3KXm5hmEqogC7wTB89VLTeJv4gbr",
 "policy_stores": [
 {
 "policy_store_id": "Dc3v9eLa2UbfCrw6wrkcmK",
 "description": "test",
 "created_at": "2024-04-23T20:35:36.300514+00:00",
 "updated_at": "2024-04-23T20:35:36.300514+00:00"
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `limit` | `integer` query | `5` | <!--source:api-specifications-->Number of policy stores to return.<!--/source--> |
| `next_token` | `string` query | `null` | <!--source:api-specifications-->Next token.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Successfully get list of policy stores.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `policy_stores`required | `object[]` | <!--source:api-specifications-->Policy stores array.<!--/source--> |
| `policy_store_id`required | `string` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |
| `description`required | `string` | <!--source:api-specifications-->Description of the policy store.<!--/source--> |
| `created_at`required | `string (date-time)` | <!--source:api-specifications-->Creation date of the policy store.<!--/source--> |
| `updated_at`required | `string (date-time)` | <!--source:api-specifications-->Last update date of the policy store.<!--/source--> |
| `next_token`required | `string` | <!--source:api-specifications-->Next token.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

`DELETE` `/policy-store/{policy_store_id}`

<!--source:api-specifications-->

#### Delete Policy Store
<!--/source-->

`deletePolicyStore`

<!--source:api-specifications-->
Delete policy store. A policy store is a container for policies.

<!--/source-->

##### Response

<!--source:api-specifications-->
400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Other responses

`204`

`PUT` `/policy-store/{policy_store_id}`

<!--source:api-specifications-->

#### Update Policy Store
<!--/source-->

`updatePolicyStore`

<!--source:api-specifications-->
Update policy store. A policy store is a container for policies.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully updated policy store.

```
{
 "message": "Policy store updated successfully."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successfully updated policy store.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message`required | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

<!--source:api-specifications-->

### Policy
<!--/source-->

`POST` `/policy-store/{policy_store_id}/policy`

<!--source:api-specifications-->

#### Create Policy
<!--/source-->

`createPolicy`

<!--source:api-specifications-->
Creates a Cedar policy and saves it in the specified policy store.

A policy is a statement that either permits or forbids a principal to take one or more actions on a resource. Each policy is evaluated independently of any other policy. For more information about how Cedar policies are structured and evaluated, see

Example of Cedar policy that permits a borrower to get property information on a specific property:

Show the rest
```
permit(principal == ExampleCo::Loan::Borrower::\"John\",action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"],resource == ExampleCo::Loan::Property::\"154 Road\") when {true};
```

Example of Cedar policy that permits a borrower to get property information on any property:

```
permit(principal == ExampleCo::Loan::Borrower::\"John\", action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"], resource) when {true};
```

Example of Cedar policy that forbids a borrower to get property information on a specific property:

```
forbid(principal == ExampleCo::Loan::Borrower::\"John\", action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"], resource == ExampleCo::Loan::Property::\"154 Road\") when {true};
```

<!--/source-->

##### Request

<!--source:api-specifications-->
Permits a borrower to get property information on a specific propertyPermits a borrower to get property information on any propertyForbids a borrower to get property information on a specific property
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "definition": "permit(principal == ExampleCo::Loan::Borrower::\"John\",action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"],resource == ExampleCo::Loan::Property::\"154 Road\") when {true};",
 "description": "example"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "definition": "permit(principal == ExampleCo::Loan::Borrower::\"John\", action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"], resource) when {true};",
 "description": "example"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "definition": "forbid(principal == ExampleCo::Loan::Borrower::\"John\", action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"], resource == ExampleCo::Loan::Property::\"154 Road\") when {true};",
 "description": "example"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully created policy.

```
{
 "policy_id": "CR3KDTmvdYUGoPFeUapsFY"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `definition`required | `string` | <!--source:api-specifications-->Cedar policy definition.<!--/source-->Example `permit(principal,action,resource) when {principal.owner == resource.owner};"}}` |
| `description` | `string` | <!--source:api-specifications-->Description of the policy.<!--/source-->Example `example` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successfully created policy.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `policy_id`required | `string` | <!--source:api-specifications-->ID of the policy.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

`GET` `/policy-store/{policy_store_id}/policy`

<!--source:api-specifications-->

#### List Policies
<!--/source-->

`listPolicies`

<!--source:api-specifications-->
List created policies.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully get list of policies.

```
{
 "next_token": null,
 "policies": [
 {
 "policy_id": "QYihkmqrnZTSvzQNhbpcjR",
 "description": "example",
 "principal": {
 "entityType": "loan::borrower",
 "entityId": "john"
 },
 "resource": {
 "entityType": "loan::preapprovallist",
 "entityId": "johnlist"
 },
 "created_at": "2024-04-22T16:50:10.977564+00:00",
 "updated_at": "2024-04-22T16:50:10.977564+00:00"
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |
| `limit` | `integer` query | `5` | <!--source:api-specifications-->Number of policies to return.<!--/source--> |
| `next_token` | `string` query | `null` | <!--source:api-specifications-->Next token.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Successfully get list of policies.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `policies`required | `object[]` | <!--source:api-specifications-->Policies array.<!--/source--> |
| `policy_id`required | `string` | <!--source:api-specifications-->ID of the policy.<!--/source--> |
| `description`required | `string` | <!--source:api-specifications-->Description of the policy.<!--/source--> |
| `principal`required | `object` | <!--source:api-specifications-->Principal of the policy.<!--/source--> |
| `resource`required | `object` | <!--source:api-specifications-->Resource of the policy.<!--/source--> |
| `created_at`required | `string (date-time)` | <!--source:api-specifications-->Creation date of the policy.<!--/source--> |
| `updated_at`required | `string (date-time)` | <!--source:api-specifications-->Last update date of the policy.<!--/source--> |
| `next_token`required | `string` | <!--source:api-specifications-->Next token.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

`DELETE` `/policy-store/{policy_store_id}/policy/{policy_id}`

<!--source:api-specifications-->

#### Delete Policy
<!--/source-->

`deletePolicy`

<!--source:api-specifications-->
Delete policy.

<!--/source-->

##### Response

<!--source:api-specifications-->
400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |
| `policy_id` required | `string` path | `CR3KDTmvdYUGoPFeUapsFY` | <!--source:api-specifications-->ID of the policy.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Other responses

`204`

`PUT` `/policy-store/{policy_store_id}/policy/{policy_id}`

<!--source:api-specifications-->

#### Update Policy
<!--/source-->

`updatePolicy`

<!--source:api-specifications-->
Update policy.

<!--/source-->

##### Request

<!--source:api-specifications-->
Permits a borrower to get property information on a specific propertyPermits a borrower to get property information on any propertyForbids a borrower to get property information on a specific property
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "definition": "permit(principal == ExampleCo::Loan::Borrower::\"John\",action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"],resource == ExampleCo::Loan::Property::\"154 Road\") when {true};",
 "description": "example"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "definition": "permit(principal == ExampleCo::Loan::Borrower::\"John\", action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"], resource) when {true};",
 "description": "example"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "definition": "forbid(principal == ExampleCo::Loan::Borrower::\"John\", action in [ExampleCo::Loan::Action::\"GetPropertyInfo\"], resource == ExampleCo::Loan::Property::\"154 Road\") when {true};",
 "description": "example"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully updated policy store.

```
{
 "message": "Policy store updated successfully."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |
| `policy_id` required | `string` path | `CR3KDTmvdYUGoPFeUapsFY` | <!--source:api-specifications-->ID of the policy.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `definition`required | `string` | <!--source:api-specifications-->Cedar policy definition.<!--/source-->Example `permit(principal,action,resource) when {principal.owner == resource.owner};"}}` |
| `description` | `string` | <!--source:api-specifications-->Description of the policy.<!--/source-->Example `example` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successfully updated policy store.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message`required | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

`GET` `/policy-store/{policy_store_id}/policy/{policy_id}`

<!--source:api-specifications-->

#### Get Policy
<!--/source-->

`getPolicy`

<!--source:api-specifications-->
Delete Policy
<!--/source-->

<!--source:api-specifications-->
Get policy.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully deleted policy.

```
{
 "principal": {
 "entityType": "loan::borrower",
 "entityId": "john"
 },
 "resource": {
 "entityType": "loan::preapprovallist",
 "entityId": "johnlist"
 },
 "definition": "permit(\n principal == loan::borrower::\"john\",\n action in [loan::Action::\"ReadPreapprovallist\",loan::Action::\"UpdatePreapprovallist\",loan::Action::\"DeletePreapprovallist\"],\n resource == loan::preapprovallist::\"johnlist\"\n) when {\n true\n};",
 "description": "example",
 "created_at": "2024-04-22T16:50:10.977564+00:00",
 "updated_at": "2024-04-22T16:50:10.977564+00:00"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |
| `policy_id` required | `string` path | `CR3KDTmvdYUGoPFeUapsFY` | <!--source:api-specifications-->ID of the policy.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->
<!--source:api-specifications-->
Successfully deleted policy.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `principal`required | `object` | <!--source:api-specifications-->Principal of the policy.<!--/source--> |
| `resource`required | `object` | <!--source:api-specifications-->Resource of the policy.<!--/source--> |
| `definition`required | `string` | <!--source:api-specifications-->Definition of the policy.<!--/source--> |
| `description`required | `string` | <!--source:api-specifications-->Description of the policy.<!--/source--> |
| `created_at`required | `string (date-time)` | <!--source:api-specifications-->Creation date of the policy.<!--/source--> |
| `updated_at`required | `string (date-time)` | <!--source:api-specifications-->Last update date of the policy.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

<!--source:api-specifications-->

### Policy Store Schema
<!--/source-->

`PUT` `/policy-store/{policy_store_id}/schema`

<!--source:api-specifications-->

#### Put Policy Store Schema
<!--/source-->

`putPolicyStoreSchema`

<!--source:api-specifications-->
Creates or updates the policy Cedar json schema in the specified policy store. The schema is used to validate any policies submitted to the policy store. Existing policies and templates are not re-evaluated against the changed schema.

For more information and examples about Cedar schema format, see .

Example of Cedar schema:

```
{
 "ExampleCo::Mortgage": {
 "actions": {
 "GetPropertyInfo": {
 "appliesTo": {
 "principalTypes": [
 "Borrower"
 ],
 "resourceTypes": [
 "Property"
 ]
 }
 },
 "GetListingInfo": {
 "appliesTo": {
 "principalTypes": [
 "Borrower"
 ],
 "resourceTypes": [
 "Listing"
 ]
 }
 }
 },
 &Show the restquot;entityTypes": {
 "Property": {
 "shape": {
 "type": "Record",
 "attributes": {
 "address": {
 "type": "String"
 },
 "property_identifier": {
 "type": "String"
 },
 "loan_identifier": {
 "type": "String"
 }
 }
 }
 },
 "Listing": {
 "shape": {
 "type": "Record",
 "attributes": {
 "total_price": {
 "type": "String"
 },
 "listing_identifier": {
 "type": "String"
 }
 }
 }
 },
 "Borrower": {
 "shape": {
 "attributes": {
 "first_name": {
 "type": "String"
 },
 "last_name": {
 "type": "String"
 },
 "person_identifier": {
 "type": "String"
 },
 "loan_identifier": {
 "type": "String"
 }
 },
 "type": "Record"
 }
 }
 }
 }
}
```

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "definition": {
 "ExampleCo::Loan": {
 "actions": {
 "GetPropertyInfo": {
 "appliesTo": {
 "principalTypes": [
 "Borrower"
 ],
 "resourceTypes": [
 "Property"
 ]
 }
 }
 },
 "entityTypes": {
 "Property": {
 "shape": {
 "type": "Record",
 "attributes": {}
 }
 },
 "Borrower": {
 "shape": {
 "attributes": {},
 "type": "Record"
 }
 }
 }
 }
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully created/updated policy store schema.

```
{
 "message": "Policy store updated successfully."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `definition` | `object` | <!--source:api-specifications-->Cedar schema of the policy store.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successfully created/updated policy store schema.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message`required | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

`GET` `/policy-store/{policy_store_id}/schema`

<!--source:api-specifications-->

#### Get Policy Store Schema
<!--/source-->

`getPolicyStoreSchema`

<!--source:api-specifications-->
Retrieve defined schema in the specified policy store.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully created/updated policy store schema.

```
{
 "schema": {
 "ExampleCo::Loan": {
 "entityTypes": {
 "Borrower": {
 "shape": {
 "attributes": {},
 "type": "Record"
 }
 },
 "Property": {
 "shape": {
 "attributes": {},
 "type": "Record"
 }
 }
 },
 "actions": {
 "GetPropertyInfo": {
 "appliesTo": {
 "principalTypes": [
 "Borrower"
 ],
 "resourceTypes": [
 "Property"
 ]
 }
 }
 }
 }
 },
 "namespaces": [
 "ExampleCo::Loan"
 ],
 "created_at": "2024-04-23T20:33:36.040403+00:00",
 "updated_at": "2024-04-24T11:19:28.118220+00:00"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Resource not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `policy_store_id` required | `string` path | `Dc3v9eLa2UbfCrw6wrkcmK` | <!--source:api-specifications-->ID of the policy store.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Successfully created/updated policy store schema.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `schema`required | `object` | <!--source:api-specifications-->Policy store schema.<!--/source--> |
| `namespaces`required | `string[]` | <!--source:api-specifications-->Namespaces.<!--/source--> |
| `created_at`required | `string (date-time)` | <!--source:api-specifications-->Creation date of the policy store schema.<!--/source--> |
| `updated_at`required | `string (date-time)` | <!--source:api-specifications-->Last update date of the policy store schema.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

<!--source:api-specifications-->

### Account Data
<!--/source-->

`POST` `/setup-master-data`

<!--source:api-specifications-->

#### Set up Master data
<!--/source-->

`account_store_new_environment_access`

<!--source:api-specifications-->
Set up master Account data
<!--/source-->

<!--source:api-specifications-->
Register the environment and API key, this configuration will set up the Account to retrieve data from the environment, allowing to set up the customer to start working with Staircase products.

The Account data bundle automatically registers the Marketplace environment which includes all needed configurations and credentials to start using Staircase products in the customer environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy .

```
{
 "environment": "test2.staircaseapi.com\"",
 "api-key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy 403 response

```
{
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
 "message": "This key is not valid for this service."
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environment`required | `string` | <!--source:api-specifications-->The environment host<!--/source-->Example `test.staircaseapi.comm` |
| `api-key`required | `string (api-key)` | <!--source:api-specifications-->The API key used in order to access APIs in the host<!--/source-->Example `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Ok.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The message.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
403 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->The URL service address.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

`DELETE` `/setup-master-data`

<!--source:api-specifications-->

#### Remove Master data
<!--/source-->

`account_remove_environments_access`

<!--source:api-specifications-->
Remove Master Account Data
<!--/source-->

<!--source:api-specifications-->
Removes the environment configuration and data so that it can stop retrieving credentials and configurations from another environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy 403 response

```
{
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
 "message": "This key is not valid for this service."
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API key<!--/source--> |
| `Content-Type` required | `string` header | `application/json` | <!--source:api-specifications-->Content Type<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Ok.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The message.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
400 response.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
403 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->The URL service address.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
404 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->The error details.<!--/source--> |

<!--source:api-specifications-->

### Access Amazon SSO
<!--/source-->

`POST` `/sso/amazon`

<!--source:api-specifications-->

#### Create SSO Configuration
<!--/source-->

`createSSOConfigurationAmazon`

<!--source:api-specifications-->
Create SSO configuration on environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "client_id": "amzn1.application-oa2-client.1234567890abcdef1234567890abcdef",
 "client_secret": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "SSO configuration Amazon set successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `client_secret`required | `string (client_secret)` | <!--source:api-specifications-->SSO provider client secret.<!--/source-->Example `<redacted>` |
| `client_id`required | `string (client_id)` | <!--source:api-specifications-->SSO provider client id.<!--/source-->Example `amzn1.application-oa2-client.1234567890abcdef1234567890abcdef` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `SSO configuration Amazon set successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
SSO Configuration existent
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`PUT` `/sso/amazon`

<!--source:api-specifications-->

#### Update SSO Configuration
<!--/source-->

`updateSSOConfigurationAmazon`

<!--source:api-specifications-->
Update SSO configuration on environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "client_id": "amzn1.application-oa2-client.1234567890abcdef1234567890abcdef",
 "client_secret": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "SSO configuration Google updated successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `client_secret`required | `string (client_secret)` | <!--source:api-specifications-->SSO provider client secret.<!--/source-->Example `<redacted>` |
| `client_id`required | `string (client_id)` | <!--source:api-specifications-->SSO provider client id.<!--/source-->Example `amzn1.application-oa2-client.1234567890abcdef1234567890abcdef` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `SSO configuration Google updated successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
SSO Configuration Conflict
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`GET` `/sso/amazon`

<!--source:api-specifications-->

#### Get SSO Configuration
<!--/source-->

`getSSOConfigurationAmazon`

<!--source:api-specifications-->
Retrieve SSO configuration set on environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "approved_js_origin": "https://auth.env.staircaseapi.com",
 "oauth_authorized_redirect": "https://auth.env.staircaseapi.com/oauth2/idpresponse"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `approved_js_origin` | `string` | <!--source:api-specifications-->approved_js_origin.<!--/source-->Example `https://auth.env.staircaseapi.com` |
| `oauth_authorized_redirect` | `string` | <!--source:api-specifications-->oauth_authorized_redirect.<!--/source-->Example `https://auth.env.staircaseapi.com/oauth2/idpresponse` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`DELETE` `/sso/amazon`

<!--source:api-specifications-->

#### Delete SSO Configuration
<!--/source-->

`deleteSSOConfigurationsAmazon`

<!--source:api-specifications-->
Delete SSO configuration set on environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`204``401``404`

<!--source:api-specifications-->

### Access Apple SSO
<!--/source-->

`POST` `/sso/apple`

<!--source:api-specifications-->

#### Create SSO Configuration
<!--/source-->

`createSSOConfigurationApple`

<!--source:api-specifications-->
Create SSO configuration on environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "client_id": "com.example.app",
 "team_id": "ABCDEFGH12345678",
 "key_id": "XYZ1234567890",
 "private_key": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "SSO configuration Apple set successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `client_id`required | `string (client_id)` | <!--source:api-specifications-->SSO provider client id.<!--/source-->Example `client_id` |
| `team_id`required | `string (team_id)` | <!--source:api-specifications-->SSO provider team id.<!--/source-->Example `team_id` |
| `key_id`required | `string (key_id)` | <!--source:api-specifications-->SSO provider key id.<!--/source-->Example `team_id` |
| `private_key`required | `string (private_key)` | <!--source:api-specifications-->SSO provider private key.<!--/source-->Example `<redacted>` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `SSO configuration Apple set successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
SSO Configuration existent
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`PUT` `/sso/apple`

<!--source:api-specifications-->

#### Update SSO Configuration
<!--/source-->

`updateSSOConfigurationApple`

<!--source:api-specifications-->
Update SSO configuration on environment. Providers Supported: Google.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "client_id": "com.example.app",
 "team_id": "ABCDEFGH12345678",
 "key_id": "XYZ1234567890",
 "private_key": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "SSO configuration Apple updated successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `client_id`required | `string (client_id)` | <!--source:api-specifications-->SSO provider client id.<!--/source-->Example `client_id` |
| `team_id`required | `string (team_id)` | <!--source:api-specifications-->SSO provider team id.<!--/source-->Example `team_id` |
| `key_id`required | `string (key_id)` | <!--source:api-specifications-->SSO provider key id.<!--/source-->Example `team_id` |
| `private_key`required | `string (private_key)` | <!--source:api-specifications-->SSO provider private key.<!--/source-->Example `<redacted>` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `SSO configuration Apple updated successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
SSO Configuration Conflict
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`GET` `/sso/apple`

<!--source:api-specifications-->

#### Get SSO Configuration
<!--/source-->

`getSSOConfigurationApple`

<!--source:api-specifications-->
Retrieve SSO configuration set on environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "approved_js_origin": "https://auth.env.staircaseapi.com",
 "oauth_authorized_redirect": "https://auth.env.staircaseapi.com/oauth2/idpresponse"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `approved_js_origin` | `string` | <!--source:api-specifications-->approved_js_origin.<!--/source-->Example `https://auth.env.staircaseapi.com` |
| `oauth_authorized_redirect` | `string` | <!--source:api-specifications-->oauth_authorized_redirect.<!--/source-->Example `https://auth.env.staircaseapi.com/oauth2/idpresponse` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`DELETE` `/sso/apple`

<!--source:api-specifications-->

#### Delete SSO Configuration
<!--/source-->

`deleteSSOConfigurationsApple`

<!--source:api-specifications-->
Delete SSO configuration set on environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`204``401``404`

<!--source:api-specifications-->

### Access Facebook SSO
<!--/source-->

`POST` `/sso/facebook`

<!--source:api-specifications-->

#### Create SSO Configuration
<!--/source-->

`createSSOConfigurationFacebook`

<!--source:api-specifications-->
Create SSO configuration on environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "client_id": "1234567890123456",
 "client_secret": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "SSO configuration Facebook set successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `client_secret`required | `string (client_secret)` | <!--source:api-specifications-->SSO provider client secret.<!--/source-->Example `<redacted>` |
| `client_id`required | `string (client_id)` | <!--source:api-specifications-->SSO provider client id.<!--/source-->Example `client_id` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `SSO configuration Facebook set successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
SSO Configuration existent
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`PUT` `/sso/facebook`

<!--source:api-specifications-->

#### Update SSO Configuration
<!--/source-->

`updateSSOConfigurationFacebook`

<!--source:api-specifications-->
Update SSO configuration on environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "client_id": "1234567890123456",
 "client_secret": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "SSO configuration Facebook updated successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `client_secret`required | `string (client_secret)` | <!--source:api-specifications-->SSO provider client secret.<!--/source-->Example `<redacted>` |
| `client_id`required | `string (client_id)` | <!--source:api-specifications-->SSO provider client id.<!--/source-->Example `client_id` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `SSO configuration Facebook updated successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
SSO Configuration Conflict
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`GET` `/sso/facebook`

<!--source:api-specifications-->

#### Get SSO Configuration
<!--/source-->

`getSSOConfigurationFacebook`

<!--source:api-specifications-->
Retrieve SSO configuration set on environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "approved_js_origin": "https://auth.env.staircaseapi.com",
 "oauth_authorized_redirect": "https://auth.env.staircaseapi.com/oauth2/idpresponse"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `approved_js_origin` | `string` | <!--source:api-specifications-->approved_js_origin.<!--/source-->Example `https://auth.env.staircaseapi.com` |
| `oauth_authorized_redirect` | `string` | <!--source:api-specifications-->oauth_authorized_redirect.<!--/source-->Example `https://auth.env.staircaseapi.com/oauth2/idpresponse` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`DELETE` `/sso/facebook`

<!--source:api-specifications-->

#### Delete SSO Configuration
<!--/source-->

`deleteSSOConfigurationsFacebook`

<!--source:api-specifications-->
Delete SSO configuration set on environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`204``401``404`

<!--source:api-specifications-->

### Access Google SSO
<!--/source-->

`POST` `/sso/google`

<!--source:api-specifications-->

#### Create SSO Configuration
<!--/source-->

`createSSOConfiguration`

<!--source:api-specifications-->
Create SSO configuration on environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "client_id": "20581095937-l92gfggdj4tl5gn227g90.apps.googleusercontent.com",
 "client_secret": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "SSO configuration Google set successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `client_secret`required | `string (client_secret)` | <!--source:api-specifications-->SSO provider client secret.<!--/source-->Example `<redacted>` |
| `client_id`required | `string (client_id)` | <!--source:api-specifications-->SSO provider client id.<!--/source-->Example `GOCSPX-MUIzom5cbFWaJs4AOIJE8JNr` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `SSO configuration Google set successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
SSO Configuration existent
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`PUT` `/sso/google`

<!--source:api-specifications-->

#### Update SSO Configuration
<!--/source-->

`updateSSOConfiguration`

<!--source:api-specifications-->
Update SSO configuration on environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "client_id": "20581095937-l92gfggdj4tl5gn227g90.apps.googleusercontent.com",
 "client_secret": "<redacted>"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "message": "SSO configuration Google updated successfully"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `client_secret`required | `string (client_secret)` | <!--source:api-specifications-->SSO provider client secret.<!--/source-->Example `<redacted>` |
| `client_id`required | `string (client_id)` | <!--source:api-specifications-->SSO provider client id.<!--/source-->Example `GOCSPX-MUIzom5cbFWaJs4AOIJE8JNr` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `SSO configuration Google updated successfully` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
SSO Configuration Conflict
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`GET` `/sso/google`

<!--source:api-specifications-->

#### Get SSO Configuration
<!--/source-->

`getSSOConfiguration`

<!--source:api-specifications-->
Retrieve SSO configuration set on environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "approved_js_origin": "https://auth.env.staircaseapi.com",
 "oauth_authorized_redirect": "https://auth.env.staircaseapi.com/oauth2/idpresponse"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `approved_js_origin` | `string` | <!--source:api-specifications-->approved_js_origin.<!--/source-->Example `https://auth.env.staircaseapi.com` |
| `oauth_authorized_redirect` | `string` | <!--source:api-specifications-->oauth_authorized_redirect.<!--/source-->Example `https://auth.env.staircaseapi.com/oauth2/idpresponse` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

`DELETE` `/sso/google`

<!--source:api-specifications-->

#### Delete SSO Configuration
<!--/source-->

`deleteSSOConfigurations`

<!--source:api-specifications-->
Delete SSO configuration set on environment.

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
User not confirmed
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`204``401``404`

<!--source:api-specifications-->

### Access SSO
<!--/source-->

`GET` `/{application_name}/sso/{sso_provider}`

<!--source:api-specifications-->

#### Get SSO by Application
<!--/source-->

`getSSOApp`

<!--source:api-specifications-->
Get SSO Links retrieves the sing-up/sing-in and logout links needed for managing SSO logged users. Providers Supported: `Google`,`Facebook`,`SignInWithApple`,`LoginWithAmazon`

There are two types of grants:

- Authorization Code Grant
- Implicit Grant

The Authorization Code Grant will return `access_token` and `id_token` as a URL fragments in the `redirect_uri` The Implicit Grant will return `access_token` and `id_token` AND `refresh_token` as a URL fragments in the `redirect_uri`

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK response

```
[
 {
 "sso_provider": "Google",
 "sso_signin_link": "https://auth.cerf-dev.staircaseapi.com/oauth2/authorize?identity_provider=Google&redirect_uri=https://webhook.site/123&response_type=token&client_id=6066huk2cnnuln4f2ajg71jnmv&scope=email+openid+profile",
 "sso_logout_link": "https://auth.cerf-dev.staircaseapi.com/logout?logout_uri=https://webhook.site/123&response_type=token&client_id=6066huk2cnnuln4f2ajg71jnmv"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `sso_provider` required | `string` path | `Google` | <!--source:api-specifications-->SSO provider.<!--/source--> |
| `application_name` required | `string` path | `access` | <!--source:api-specifications-->Application name.<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
OK response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `sso_provider` | `string` | <!--source:api-specifications-->Configuration message.<!--/source-->Example `Google, SSO configurations set` |
| `sso_signin_link` | `string` | <!--source:api-specifications-->Redirect UI added.<!--/source-->Example `https://ui.redirect/logged/users` |
| `sso_logout_link` | `string` | <!--source:api-specifications-->Redirect UI added.<!--/source-->Example `https://ui.redirect/logged/users` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
To many requests
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401``404`

<!--source:api-specifications-->

### Operations
<!--/source-->

`GET` `/smoke`

<!--source:api-specifications-->

#### Smoke endpoint
<!--/source-->

<!--source:api-specifications-->
Endpoint to check service health

<!--/source-->

##### Other responses

`200`

`POST` `/tenants`

<!--source:api-specifications-->

#### Create necessary AWS instances for new tenant
<!--/source-->

<!--source:api-specifications-->
Tenant is client of staircase. When a new client registers we should create virtual infrastructure for him: create new domain in format {tenant_name}.api.stairacaseapi.com, map specified API to {tenant_name}.api.stairacaseapi.com/{base_path}, create new usage plan with {tenant_name} name for API's specified in api_mapping. That what this endpoint does.

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `tenant_name` | `string` | — |
| `api_mapping` | `array` | — |

##### Response `202``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
202 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `start_time` | `string` | — |
| `status` | `string` | — |

##### Other responses

`400`

`POST` `/tenants/{tenant_name}/keys`

<!--source:api-specifications-->

#### Generate API key
<!--/source-->

<!--source:api-specifications-->
Generate API key for specified tenant and add it to tenant usage plan

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `tenant_name` required | `string` path | <!--source:api-specifications-->Tenant name<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
201 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `x-api-key` | `string` | — |

## Errors

`400``401``403``404``409``422``429``500`

## More in Distribution

- Next product: Console
