Create integration account
Creates a new integration account. The response type depends on the authentication type specified in the request:
-
For OAuth authentication (authType: 'OAUTH'):
- Requires clientRedirectURL in the request
- Returns CreateIntegrationAccountOAuthResponse with OAuth URL for authorization
- Includes webhook subscription information
-
For other authentication methods (authType: 'API_KEY', 'USERNAME_PASSWORD'):
- Requires appropriate authConfig in the request
- Returns CreateIntegrationAccountResponse with the created account details
- May include webhook URLs if manual subscription is required
Authorization
x-calry-api-key In: header
Header Parameters
Optional tenant ID to specify which tenant to operate as. Controls access to integration accounts. If not provided, the default tenant will be used.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/integration-account" \ -H "Content-Type: application/json" \ -d '{ "name": "My Hostaway Account", "accountIdentifier": "hostaway-12345", "provider": "HOSTAWAY", "authType": "OAUTH" }'{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My Hostaway Account",
"workspaceID": "123e4567-e89b-12d3-a456-426614174000",
"tenantID": "123e4567-e89b-12d3-a456-426614174000",
"provider": "HOSTAWAY",
"providerAccountID": "provider-account-12345",
"accountIdentifier": "hostaway-12345",
"authType": "OAUTH",
"defaultDiscountPercentage": 10,
"markupPercentage": 5,
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-02T00:00:00.000Z",
"status": "ACTIVE",
"webhooksSubscribed": true,
"distributionMarkupPercentage": 10,
"allowImport": true,
"tags": [
{
"id": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"workspaceID": "string",
"listingIds": [
[
"string"
]
]
}
],
"alertsMuted": false,
"webhookURLs": [
"https://api.example.com/webhooks/12345"
]
}{
"timestamp": "2025-03-05T11:45:49.631Z",
"path": "<URL_PATH>",
"message": "Bad Request",
"details": []
}{
"timestamp": "2025-03-05T11:45:49.631Z",
"path": "<URL_PATH>",
"message": "Authentication failed",
"details": []
}