Accounts
My account
GET /accounts/me
Return current user account information. This is often used to validate authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| x-api-key | header | string | true | API Authentication Key |
Example responses
200 Response
{
"id": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"is_active": true,
"is_suspended": true,
"last_login": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
},
"billing": {
"parent_account": "string"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A user object | AccountDetailsResponse |
| 400 | Bad Request | An error message | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'string'
}
r = requests.get('https://data.autohost.ai/v1/accounts/me', headers=headers)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const headers = {
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/me', {
method: 'get',
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Reseller accounts list
GET /accounts/children
Paginated list of user accounts belonging to a reseller profile.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | number | false | Pagination control |
| size | query | number | false | Number of items to return |
| x-api-key | header | string | true | API Authentication Key |
Example responses
200 Response
{
"from": 0,
"size": 0,
"total": 0,
"items": [
{
"id": "string",
"name": "string",
"email": "user@example.com",
"phone": "string"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of account objects | AccountChildrenResponse |
| 400 | Bad Request | An error message | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'string'
}
r = requests.get('https://data.autohost.ai/v1/accounts/children', headers=headers)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const headers = {
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/children', {
method: 'get',
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Delete API key
DELETE /accounts/keys/{key}
Delete an existing API key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| key | path | string | true | The API key ID |
| x-api-key | header | string | true | API Authentication Key |
Example responses
Deletion success message
{
"message": "Key removed"
}
403 Response
{
"error": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Deletion success message | AccountApiKeyDeleteResponse |
| 403 | Forbidden | Unauthorized access | ErrorResponse |
| 500 | Internal Server Error | Internal server error | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'string'
}
r = requests.delete('https://data.autohost.ai/v1/accounts/keys/{key}', headers=headers)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const headers = {
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/keys/{key}', {
method: 'delete',
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Reseller new account
POST /accounts/register
Register a new account under a channel profile. This is used by resellers and channel partners to create Autohost user accounts.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| x-api-key | header | string | true | API Authentication Key |
| body | body | AccountRegistrationRequest | false | JSON object with user account details |
Body parameter
{
"name": "string",
"email": "user@example.com",
"phone": "string",
"password": "string",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
}
}
Example responses
200 Response
{
"id": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"is_active": true,
"is_suspended": true,
"last_login": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
},
"billing": {
"parent_account": "string"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A user object | AccountDetailsResponse |
| 400 | Bad Request | An error message | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
input_body = {
"name": "string",
"email": "user@example.com",
"phone": "string",
"password": "string",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
}
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}
r = requests.post('https://data.autohost.ai/v1/accounts/register', json=input_body, headers=headers)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const inputBody = {
"name": "string",
"email": "user@example.com",
"phone": "string",
"password": "string",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
}
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/register', {
method: 'post',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Reseller update account
PUT /accounts/{id}
Update a channel account. This is used by resellers and channel partners to update Autohost user accounts.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | true | Autohost user ID |
| suspended | query | string | false | Suspend or unsuspend the account |
| status | query | string | false | Enable or disable the account |
| x-api-key | header | string | true | API Authentication Key |
| body | body | AccountRegistrationRequest | false | JSON object with user account details |
Enumerated Values
| Parameter | Value |
|---|---|
| suspended | true |
| suspended | false |
| status | active |
| status | disabled |
Body parameter
{
"name": "string",
"email": "user@example.com",
"phone": "string",
"password": "string",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
}
}
Example responses
200 Response
{
"id": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"is_active": true,
"is_suspended": true,
"last_login": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
},
"billing": {
"parent_account": "string"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | User account object | AccountDetailsResponse |
| 400 | Bad Request | An error message | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
input_body = {
"name": "string",
"email": "user@example.com",
"phone": "string",
"password": "string",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
}
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}
r = requests.put('https://data.autohost.ai/v1/accounts/{id}', json=input_body, headers=headers)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const inputBody = {
"name": "string",
"email": "user@example.com",
"phone": "string",
"password": "string",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
}
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/{id}', {
method: 'put',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Reseller signup link
POST /accounts/signup
Generate a self-signup link for a given PMS. This is used by resellers and channel partners to create registration links they can send to their customers.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| pms | query | QueryParamPMS | true | PMS integration name |
| redirect | query | string | false | URL to redirect to after signup |
| hidepw | query | string | false | Hide password screen during user signup |
| x-api-key | header | string | true | API Authentication Key |
Enumerated Values
| Parameter | Value |
|---|---|
| pms | api |
| pms | apaleo |
| pms | beds24 |
| pms | booking |
| pms | cloudbeds |
| pms | guesty |
| pms | hostaway |
| pms | hostfully |
| pms | inforhms |
| pms | impala |
| pms | lavanda |
| pms | myvr |
| pms | opera |
| pms | smartbnb |
| pms | stayntouch |
| pms | streamline |
| pms | trackhs |
Example responses
200 Response
{
"url": "http://example.com",
"expiry": "2019-08-24T14:15:22Z"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A signup object | AccountSignupLinkResponse |
| 400 | Bad Request | An error message | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'string'
}
params = {
'pms': 'api'
}
r = requests.post('https://data.autohost.ai/v1/accounts/signup', headers=headers, params=params)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const headers = {
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/signup', {
method: 'post',
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Account create webhook
POST /accounts/webhooks
Register a new webhook. This is used by platforms such as Zapier to register webhooks.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| x-api-key | header | string | true | API Authentication Key |
| body | body | AccountWebhooksRequest | false | JSON object with webhook details |
Body parameter
{
"webhook_url": "http://example.com",
"webhook_key": "guest_portal_webhook_url"
}
Example responses
200 Response
{
"message": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Webhooks object | AccountWebhooksResponse |
| 400 | Bad Request | An error message | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
input_body = {
"webhook_url": "http://example.com",
"webhook_key": "guest_portal_webhook_url"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}
r = requests.post('https://data.autohost.ai/v1/accounts/webhooks', json=input_body, headers=headers)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const inputBody = {
"webhook_url": "http://example.com",
"webhook_key": "guest_portal_webhook_url"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/webhooks', {
method: 'post',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Account remove webhook
DELETE /accounts/webhooks
Delete an existing webhook. This is used by platforms such as Zapier to unregister webhooks.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| x-api-key | header | string | true | API Authentication Key |
| body | body | AccountWebhooksRequest | false | JSON object with webhook details |
Body parameter
{
"webhook_url": "http://example.com",
"webhook_key": "guest_portal_webhook_url"
}
Example responses
200 Response
{
"message": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Webhooks object | AccountWebhooksResponse |
| 400 | Bad Request | An error message | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
input_body = {
"webhook_url": "http://example.com",
"webhook_key": "guest_portal_webhook_url"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}
r = requests.delete('https://data.autohost.ai/v1/accounts/webhooks', json=input_body, headers=headers)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const inputBody = {
"webhook_url": "http://example.com",
"webhook_key": "guest_portal_webhook_url"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/webhooks', {
method: 'delete',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Update Guest Portal screen settings for an account
GET /accounts/settings/guest-portal-screens/{key}
Update your own account settings, or update another user's account Guest Portal screen settings if you have the necessary permissions.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | true | Autohost user ID (optional) |
| x-api-key | header | string | false | API Authentication Key |
| body | body | AccountSettingsRequest | false | JSON object with account settings |
Body parameter
{
"config_key": "guest_portal_screens_for_repeat_guests",
"config_data": [
{
"source": "MINT",
"guest_portal_screens": {
"AboutYou": "required",
"AuthorityReporting": "disabled",
"FraudDetectionAddon": "disabled",
"AdverseMediaSearchAddon": "disabled"
}
}
]
}
Example responses
Settings object
{
"config_key": "guest_portal_screens_for_repeat_guests",
"config_data": [
{
"source": "MINT",
"guest_portal_screens": {
"AboutYou": "required",
"PurposeOfStay": "disabled",
"TimeInfoEdit": "disabled"
}
}
]
}
{
"config_key": "guest_portal_screens_by_source",
"config_data": [
{
"source": "Airbnb",
"guest_portal_screens": {
"BackgroundCheck": "disabled",
"CreditCheck": "disabled",
"IDVerification": "disabled"
}
}
]
}
400 Response
{
"error": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Settings object | AccountSettingsResponse |
| 400 | Bad Request | An error message | ErrorResponse |
Code samples
"""
Python Code Snippet
"""
import requests
input_body = {
"config_key": "guest_portal_screens_for_repeat_guests",
"config_data": [
{
"source": "MINT",
"guest_portal_screens": {
"AboutYou": "required",
"AuthorityReporting": "disabled",
"FraudDetectionAddon": "disabled",
"AdverseMediaSearchAddon": "disabled"
}
}
]
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}
r = requests.get('https://data.autohost.ai/v1/accounts/settings/guest-portal-screens/{key}', json=input_body, headers=headers)
print(r.json())
/*
TypeScript Code Snippet
*/
import fetch from 'node-fetch';
const inputBody = {
"config_key": "guest_portal_screens_for_repeat_guests",
"config_data": [
{
"source": "MINT",
"guest_portal_screens": {
"AboutYou": "required",
"AuthorityReporting": "disabled",
"FraudDetectionAddon": "disabled",
"AdverseMediaSearchAddon": "disabled"
}
}
]
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};
const response = await fetch('https://data.autohost.ai/v1/accounts/settings/guest-portal-screens/{key}', {
method: 'get',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);
Schemas
AccountDetailsResponse
{
"id": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"is_active": true,
"is_suspended": true,
"last_login": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
},
"billing": {
"parent_account": "string"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | false | none | none |
| name | string | false | none | none |
| string(email) | false | none | none | |
| phone | string | false | none | none |
| is_active | boolean | false | none | none |
| is_suspended | boolean | false | none | none |
| last_login | string(date-time) | false | none | none |
| created_at | string(date-time) | false | none | none |
| company | object | false | none | none |
| » name | string | false | none | none |
| string(email) | false | none | none | |
| » phone | string | false | none | none |
| billing | object | false | none | none |
| » parent_account | string | false | none | none |
ErrorResponse
{
"error": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| error | string | false | none | none |
AccountChildrenResponse
{
"from": 0,
"size": 0,
"total": 0,
"items": [
{
"id": "string",
"name": "string",
"email": "user@example.com",
"phone": "string"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| from | number | false | none | none |
| size | number | false | none | none |
| total | number | false | none | none |
| items | [object] | false | none | none |
| » id | string | false | none | none |
| » name | string | false | none | none |
| string(email) | false | none | none | |
| » phone | string | false | none | none |
AccountApiKeysResponse
[
{
"user_id": "string",
"user_name": "string",
"value": "string",
"description": "string",
"sdk": true
}
]
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| user_id | string | false | none | The user ID of the API key owner |
| user_name | string | false | none | The user name of the API key owner |
| value | string | false | none | The API key secret |
| description | string | false | none | User-controlled description of the API key |
| sdk | boolean | false | none | Whether this is an SDK API key |
AccountApiKeyCreateRequest
{
"description": "string",
"sdk": false
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| description | string | false | none | Description for the API key |
| sdk | boolean | false | none | Whether this is an SDK API key |
AccountApiKeyResponse
{
"id": "string",
"name": "string",
"description": "string",
"value": "string",
"enabled": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"sdk": true
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | false | none | The API key ID |
| name | string | false | none | The API key name |
| description | string | false | none | User-controlled description of the API key |
| value | string | false | none | The API key secret |
| enabled | boolean | false | none | Whether the API key is enabled |
| created_at | string(date-time) | false | none | The date and time the API key was created |
| updated_at | string(date-time) | false | none | The date and time the API key was last updated |
| sdk | boolean | false | none | Whether this is an SDK API key |
AccountApiKeyUpdateRequest
{
"description": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| description | string | true | none | New description for the API key |
AccountApiKeyDeleteResponse
{
"message": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| message | string | false | none | none |
AccountRegistrationRequest
{
"name": "string",
"email": "user@example.com",
"phone": "string",
"password": "string",
"company": {
"name": "string",
"email": "user@example.com",
"phone": "string"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| name | string | false | none | none |
| string(email) | false | none | none | |
| phone | string | false | none | none |
| password | string | false | none | none |
| company | object | false | none | none |
| » name | string | false | none | none |
| string(email) | false | none | none | |
| » phone | string | false | none | none |
QueryParamPMS
"api"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | api |
| anonymous | apaleo |
| anonymous | beds24 |
| anonymous | booking |
| anonymous | cloudbeds |
| anonymous | guesty |
| anonymous | hostaway |
| anonymous | hostfully |
| anonymous | inforhms |
| anonymous | impala |
| anonymous | lavanda |
| anonymous | myvr |
| anonymous | opera |
| anonymous | smartbnb |
| anonymous | stayntouch |
| anonymous | streamline |
| anonymous | trackhs |
AccountSignupLinkResponse
{
"url": "http://example.com",
"expiry": "2019-08-24T14:15:22Z"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| url | string(uri) | false | none | none |
| expiry | string(date-time) | false | none | none |
AccountWebhooksRequest
{
"webhook_url": "http://example.com",
"webhook_key": "guest_portal_webhook_url"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| webhook_url | string(uri) | false | none | none |
| webhook_key | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| webhook_key | guest_portal_webhook_url |
| webhook_key | screening_webhook_url |
| webhook_key | stargate_webhook_url |
| webhook_key | reservation_webhook_url |
| webhook_key | listing_webhook_url |
| webhook_key | account_webhook_url |
AccountWebhooksResponse
{
"message": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| message | string | false | none | none |
AccountSettingsRequest
{
"config_key": "guest_portal_screens_for_repeat_guests",
"config_data": [
{
"source": "string",
"guest_portal_screens": {
"AboutYou": "disabled",
"AuthorityReporting": "disabled",
"BuildingScreen": "disabled",
"BackgroundCheck": "disabled",
"CreditCheck": "disabled",
"IDVerification": "disabled",
"IDCollection": "disabled",
"SecurityDeposit": "disabled",
"UsageAgreement": "disabled",
"Coronavirus": "disabled",
"CustomScreen": "disabled",
"FileUpload": "disabled",
"GuestList": "disabled",
"HouseRules": "disabled",
"LongTerm": "disabled",
"PurposeOfStay": "disabled",
"TimeInfoEdit": "disabled",
"SexOffendersAddon": "disabled",
"SocialVerificationAddon": "disabled",
"SanctionsSearchAddon": "disabled",
"FraudDetectionAddon": "disabled",
"AdverseMediaSearchAddon": "disabled"
}
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| config_key | string | false | none | Configuration key |
| config_data | [any] | false | none | Configuration data for each source |
Enumerated Values
| Property | Value |
|---|---|
| config_key | guest_portal_screens_for_repeat_guests |
| config_key | guest_portal_screens_by_source |
AccountSettingsResponse
{
"config_key": "guest_portal_screens_for_repeat_guests",
"config_data": {}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| config_key | string | false | none | Configuration key |
| config_data | object | false | none | Configuration data |
Enumerated Values
| Property | Value |
|---|---|
| config_key | guest_portal_screens_for_repeat_guests |
| config_key | guest_portal_screens_by_source |