Skip to content

Tenants API

Maintained by: Aether365 Team Audience: Developers Scope: Tenant API endpoints - reading and updating tenant configuration

Get Current Tenant

Returns the authenticated tenant's profile and plan information.

GET /tenants/me

Example Request

bash
curl https://api.aether365.io/tenants/me \
  -H "Authorization: Bearer ak_live_..."

Example Response

json
{
  "success": true,
  "data": {
    "id": "7c1b2a3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    "cognitoUserId": "a1b2c3d4-...",
    "email": "admin@example.com",
    "firstName": "Ada",
    "lastName": "Lovelace",
    "companyName": "Example Corp",
    "logoUrl": "https://logo.clearbit.com/example.com",
    "planTier": "pro",
    "theme": "light",
    "stripeCustomerId": "cus_...",
    "createdAt": "2026-01-15T10:00:00+00:00",
    "updatedAt": "2026-04-01T08:30:00+00:00",
    "config": {
      "msTenantId": "f1e2d3c4-b5a6-9788-1c2d-3e4f5a6b7c8d",
      "connectedAt": "2026-01-15T10:05:00+00:00",
      "scheduleArn": "arn:aws:scheduler:..."
    },
    "isOwner": true,
    "isMicrosoftUser": true,
    "language": "en",
    "displayName": "Ada Lovelace"
  }
}

Response Fields

FieldTypeDescription
idstringTenant identifier (UUID)
cognitoUserIdstringIdentity of the account owner
emailstringAccount owner email (a member sees their own email)
firstName / lastNamestring or nullProfile name fields
companyNamestringCompany name; falls back to a name derived from the email domain
logoUrlstring or nullBest-effort logo URL derived from the email domain
planTierstringCurrent plan: free, pro, enterprise
themestringDashboard theme preference
stripeCustomerIdstring or nullBilling reference, if a Stripe customer exists
createdAt / updatedAtstring or nullISO 8601 timestamps
configobject or nullPrimary connection: msTenantId, connectedAt, scheduleArn
isOwnerbooleanWhether the caller is the account owner (vs. a team member)
isMicrosoftUserbooleanWhether the account signs in with Microsoft
languagestringAccount language for emails and reports
displayNamestringPresent when a display name is known

Update Tenant Profile

Partially updates the tenant profile. Only the fields you include are changed.

PATCH /tenants/me

Request Body

json
{
  "companyName": "Acme Security Ltd"
}
FieldTypeRequiredDescription
companyNamestringNoDisplay name for the tenant (1-200 chars)
firstNamestringNoOwner first name (max 50 chars)
lastNamestringNoOwner last name (max 50 chars)

Example Request

bash
curl -X PATCH https://api.aether365.io/tenants/me \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{"companyName": "Acme Security Ltd"}'

Example Response

Returns the base tenant object (without the config, isOwner, isMicrosoftUser, language and displayName extras of GET /tenants/me):

json
{
  "success": true,
  "data": {
    "id": "7c1b2a3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    "email": "admin@example.com",
    "firstName": "Ada",
    "lastName": "Lovelace",
    "companyName": "Acme Security Ltd",
    "planTier": "pro",
    "createdAt": "2026-01-15T10:00:00+00:00",
    "updatedAt": "2026-04-10T12:00:00+00:00"
  }
}
Was this page helpful?