Skip to content

API Reference

Welcome to the AstroAPI Reference documentation. This section provides detailed information about all available endpoints.

OpenAPI Specification

The complete API is documented using the OpenAPI 3.1 specification. Use the sidebar to browse available endpoints organized by category.

Base URL

https://api.astroapi.cloud

Authentication

All API requests require authentication via:

  • API Key: X-Api-Key header

See the Authentication Guide for details.

Response Format

All responses follow the JSON:API specification:

json
{
  "data": {
    "type": "resource-type",
    "id": "resource-id",
    "attributes": { ... }
  }
}

Error Responses

Errors follow JSON:API error format:

json
{
  "errors": [{
    "status": "400",
    "title": "Bad Request",
    "detail": "Detailed error message"
  }]
}

Common HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Missing or invalid authentication
403Forbidden - Insufficient permissions or module access
404Not Found
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Professional astrology API for natal charts, transits, synastry, and interpretations

Servers

https://api.astroapi.cloudProduction

Create Custom Copy

POST
/api/content/{id}/create-custom-copy

Create an organization-specific copy of system content for customization.

Parameters

Path Parameters

id*
Typestring
Required

Responses

Create a custom copy of system content

application/vnd.api+json
JSON
{
"data": {
"type": "content",
"id": "string",
"attributes": {
"urn": "string",
"title": "string",
"body": "string",
"metadata": null,
"owner_type": "string",
"owner_id": "string",
"base_content_id": "string",
"created_at": "string",
"updated_at": "string"
},
"links": {
"self": "string"
}
}
}

Playground

Variables
Key
Value

Samples


Restore Content

POST
/api/content/{id}/restore

Restore custom content to match the original system content.

Parameters

Path Parameters

id*
Typestring
Required

Responses

Restore custom content to match system content

application/vnd.api+json
JSON
{
"data": {
"type": "content",
"id": "string",
"attributes": {
"urn": "string",
"title": "string",
"body": "string",
"metadata": null,
"owner_type": "string",
"owner_id": "string",
"base_content_id": "string",
"created_at": "string",
"updated_at": "string"
},
"links": {
"self": "string"
}
}
}

Playground

Variables
Key
Value

Samples


Delete Content by ID

DELETE
/api/content/{id}

Delete a content item by its ID.

Parameters

Path Parameters

id*
Typestring
Required

Responses

Delete one content item

application/vnd.api+json
JSON
{
"data": {
"type": "content",
"id": "string",
"attributes": {
"urn": "string",
"title": "string",
"body": "string",
"metadata": null,
"owner_type": "string",
"owner_id": "string",
"base_content_id": "string",
"created_at": "string",
"updated_at": "string"
},
"links": {
"self": "string"
}
}
}

Playground

Variables
Key
Value

Samples


List Content

GET
/api/content/{horoscopeType}/{contentType}

Retrieve a paginated list of content items filtered by horoscope and content type.

Parameters

Path Parameters

horoscopeType*
Typestring
Required
contentType*
Typestring
Required

Responses

Retrieve content items

application/vnd.api+json
JSON
{
"data": {
"type": "content",
"id": "string",
"attributes": {
"urn": "string",
"title": "string",
"body": "string",
"metadata": null,
"owner_type": "string",
"owner_id": "string",
"base_content_id": "string",
"created_at": "string",
"updated_at": "string"
},
"links": {
"self": "string"
}
}
}

Playground

Variables
Key
Value

Samples


Create Content

POST
/api/content/{horoscopeType}/{contentType}

Create a new content item for a specific horoscope and content type.

Parameters

Path Parameters

horoscopeType*
Typestring
Required
contentType*
Typestring
Required

Responses

Create content item

application/vnd.api+json
JSON
{
"data": {
"type": "content",
"id": "string",
"attributes": {
"urn": "string",
"title": "string",
"body": "string",
"metadata": null,
"owner_type": "string",
"owner_id": "string",
"base_content_id": "string",
"created_at": "string",
"updated_at": "string"
},
"links": {
"self": "string"
}
}
}

Playground

Variables
Key
Value

Samples


Get Content

GET
/api/content/{horoscopeType}/{contentType}/{id}

Retrieve a single content item by its ID.

Parameters

Path Parameters

id*
Typestring
Required
horoscopeType*
Typestring
Required
contentType*
Typestring
Required

Responses

Retrieve one content item

application/vnd.api+json
JSON
{
"data": {
"type": "content",
"id": "string",
"attributes": {
"urn": "string",
"title": "string",
"body": "string",
"metadata": null,
"owner_type": "string",
"owner_id": "string",
"base_content_id": "string",
"created_at": "string",
"updated_at": "string"
},
"links": {
"self": "string"
}
}
}

Playground

Variables
Key
Value

Samples


Delete Content

DELETE
/api/content/{horoscopeType}/{contentType}/{id}

Delete a content item by horoscope type, content type, and ID.

Parameters

Path Parameters

id*
Typestring
Required
horoscopeType*
Typestring
Required
contentType*
Typestring
Required

Responses

Delete one content item

Playground

Variables
Key
Value

Samples


Natal Chart

POST
/api/calc/natal

Calculate a natal (birth) chart with planetary positions, house cusps, and aspects.

Request Body

application/json
JSON
{
"dateTime": "string",
"location": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"houseSystem": "placidus",
"language": "en",
"includeText": true,
"includeReadableEntities": false,
"points": [
"string"
],
"orbs": {
"additionalProperties": 0
}
}

Responses

Calculate natal chart

application/vnd.api+json
JSON
{
"data": {
"dateTime": "string",
"aspects": [
{
"pointA": "string",
"pointB": "string",
"aspect": "string",
"angle": 0,
"orb": 0,
"applying": true,
"text": "string"
}
],
"points": {
"additionalProperties": {
}
},
"houses": {
"cusps": [
0
],
"ascmc": [
0
]
},
"chart": {
"url": "string"
}
}
}

Playground

Body

Samples


Synastry Chart

POST
/api/calc/synastry

Calculate synastry aspects between two birth charts for relationship analysis.

Request Body

application/json
JSON
{
"dateTime1": "string",
"location1": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"dateTime2": "string",
"location2": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"houseSystem": "placidus",
"language": "en",
"includeText": true,
"includeReadableEntities": false,
"points": [
"string"
],
"orbs": {
"additionalProperties": 0
}
}

Responses

Calculate synastry chart

application/vnd.api+json
JSON
{
"data": {
"aspects1to2": [
{
"pointA": "string",
"pointB": "string",
"aspect": "string",
"angle": 0,
"orb": 0,
"applying": true,
"text": "string"
}
],
"aspects2to1": [
{
"pointA": "string",
"pointB": "string",
"aspect": "string",
"angle": 0,
"orb": 0,
"applying": true,
"text": "string"
}
]
}
}

Playground

Body

Samples


Composite Chart

POST
/api/calc/composite

Calculate a composite chart by combining midpoints of two birth charts.

Request Body

application/json
JSON
{
"dateTime1": "string",
"location1": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"dateTime2": "string",
"location2": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"houseSystem": "placidus",
"language": "en",
"includeText": true,
"includeReadableEntities": false,
"points": [
"string"
],
"orbs": {
"additionalProperties": 0
}
}

Responses

Calculate composite chart

application/vnd.api+json
JSON
{
"data": {
"points": {
"additionalProperties": {
}
},
"aspects": [
{
"pointA": "string",
"pointB": "string",
"aspect": "string",
"angle": 0,
"orb": 0,
"applying": true,
"text": "string"
}
]
}
}

Playground

Body

Samples


Transit Chart

POST
/api/calc/transit

Calculate planetary transits over a natal chart for a specified time period.

Request Body

application/json
JSON
{
"birthDate": "string",
"birthLocation": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"transitDateStart": "string",
"transitDateEnd": "string",
"transitLocation": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"houseSystem": "placidus",
"language": "en",
"includeText": true,
"includeReadableEntities": false,
"points": [
"string"
]
}

Responses

Calculate transits chart

application/vnd.api+json
JSON
{
"data": {
"crossings": {
"additionalProperties": [
]
},
"aspects": [
]
}
}

Playground

Body

Samples


Compatibility Analysis

POST
/api/calc/compatibility

Calculate sun sign compatibility between two people with interpretation text.

Request Body

application/json
JSON
{
"dateTime1": "string",
"location1": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"dateTime2": "string",
"location2": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"language": "en",
"includeText": true,
"includeReadableEntities": false
}

Responses

Calculate compatibility between two birth charts

application/vnd.api+json
JSON
{
"data": {
"sign1": "string",
"sign2": "string",
"text": "string"
}
}

Playground

Body

Samples


Solar Return

POST
/api/calc/solar-return

Calculate the solar return chart for a specific year (birthday chart).

Request Body

application/json
JSON
{
"birthDateTime": "string",
"birthLocation": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"returnYear": 0,
"houseSystem": "placidus",
"language": "en",
"includeText": true,
"includeReadableEntities": false,
"points": [
"string"
],
"orbs": {
"additionalProperties": 0
}
}

Responses

Calculate solar return chart

application/vnd.api+json
JSON
{
"data": {
"returnYear": 0,
"returnDate": "string",
"aspects": [
{
"pointA": "string",
"pointB": "string",
"aspect": "string",
"angle": 0,
"orb": 0,
"applying": true,
"text": "string"
}
],
"points": {
"additionalProperties": {
}
},
"houses": {
"cusps": [
0
],
"ascmc": [
0
]
},
"chart": {
"url": "string"
}
}
}

Playground

Body

Samples


Lunar Return

POST
/api/calc/lunar-return

Calculate the lunar return chart when the Moon returns to its natal position.

Request Body

application/json
JSON
{
"birthDateTime": "string",
"birthLocation": {
"longitude": 0,
"latitude": 0,
"timezone": "string"
},
"returnDate": "string",
"houseSystem": "placidus",
"language": "en",
"includeText": true,
"includeReadableEntities": false,
"points": [
"string"
],
"orbs": {
"additionalProperties": 0
}
}

Responses

Calculate lunar return chart

application/vnd.api+json
JSON
{
"data": {
"returnDate": "string",
"aspects": [
{
"pointA": "string",
"pointB": "string",
"aspect": "string",
"angle": 0,
"orb": 0,
"applying": true,
"text": "string"
}
],
"points": {
"additionalProperties": {
}
},
"houses": {
"cusps": [
0
],
"ascmc": [
0
]
},
"chart": {
"url": "string"
}
}
}

Playground

Body

Samples


Chinese Zodiac Sign

POST
/api/calc/chinese-horoscope

Calculate the Chinese zodiac sign and element based on birth year.

Request Body

application/json
JSON
{
"birthDate": "string",
"language": "en",
"includeText": true,
"includeReadableEntities": false
}

Responses

Calculate Chinese horoscope sign

application/vnd.api+json
JSON
{
"data": {
"sign": "string",
"element": "string",
"year": 0,
"text": "string"
}
}

Playground

Body

Samples


Chinese Zodiac Forecast

POST
/api/calc/chinese-forecast

Get Chinese zodiac forecast for a specific year with category breakdowns.

Request Body

application/json
JSON
{
"birthDate": "string",
"forecastYear": 0,
"language": "en",
"includeText": true,
"includeReadableEntities": false
}

Responses

Calculate Chinese horoscope forecast

application/vnd.api+json
JSON
{
"data": {
"sign": "string",
"year": 0,
"text": "string",
"categories": {
"additionalProperties": "string"
}
}
}

Playground

Body

Samples


Create Organization

POST
/api/org

Create a new organization with Stripe billing setup.

Responses

Create organization

application/vnd.api+json
JSON
[
]

Playground

Samples


List Members

GET
/api/org/users

Get a paginated list of organization members.

Responses

List organization users

application/vnd.api+json
JSON
{
"links": {
"self": "string",
"next": "string"
},
"data": [
{
"id": "string",
"type": "user",
"attributes": {
"email": "string",
"name": "string",
"role": "string"
}
}
],
"meta": {
"count": 0
}
}

Playground

Samples


Add Member

POST
/api/org/users

Add or invite a new member to the organization.

Request Body

application/json
JSON
{
"email": "string",
"name": "string",
"role": "string"
}

Responses

Member toegevoegd/uitgenodigd

application/vnd.api+json
JSON
{
"data": {
"memberId": "string",
"userId": "string",
"role": "string"
}
}

Playground

Body

Samples


Remove Member

DELETE
/api/org/users/{memberId}

Remove a member from the organization.

Parameters

Path Parameters

memberId*
Typestring
Required
Min Length1

Responses

Member verwijderd

Playground

Variables
Key
Value

Samples


Update Member

PATCH
/api/org/users/{memberId}

Update an organization member's role.

Parameters

Path Parameters

memberId*
Typestring
Required
Min Length1

Request Body

application/json
JSON
{
"role": "string"
}

Responses

Member geüpdatet

application/vnd.api+json
JSON
{
"data": {
"memberId": "string",
"role": "string"
}
}

Playground

Variables
Key
Value
Body

Samples


Modules


List Modules

GET
/api/modules

Get all available modules with pricing information.

Responses

List all available modules

application/json
JSON
{
"data": [
{
"id": "string",
"name": "string",
"description": "string",
"category": "string",
"horoscopeType": "string",
"contentType": "string",
"priceCents": 0
}
]
}

Playground

Samples


Organization Modules

GET
/api/modules/organization

Get the list of modules the current organization has access to.

Responses

List modules for current organization

application/json
JSON
{
"data": [
"string"
]
}

Playground

Samples


Subscription Plans

GET
/api/modules/plans

Get all available subscription plans with included modules and pricing.

Responses

List all subscription plans

application/json
JSON
{
"data": [
{
"id": "string",
"name": "string",
"description": "string",
"modules": [
"string"
],
"discountPercentage": 0,
"priceCents": 0,
"stripePriceId": "string"
}
]
}

Playground

Samples


Check Module Access

GET
/api/modules/check/{moduleId}

Check if the current organization has access to a specific module.

Parameters

Path Parameters

moduleId*
Typestring
Required

Responses

Check module access

application/json
JSON
{
"hasAccess": true
}

Playground

Variables
Key
Value

Samples


List API Keys

GET
/api/api-keys

Get all API keys owned by the current user.

Responses

List of API keys

application/json
JSON
{
"data": [
{
"id": "string",
"name": "string",
"prefix": "string",
"start": "string",
"organizationId": "string",
"enabled": true,
"permissions": [
"string"
],
"modules": [
"string"
],
"expiresAt": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
}

Playground

Samples


Create API Key

POST
/api/api-keys

Create a new API key with optional permission and module restrictions.

Request Body

application/json
JSON
{
"name": "string",
"organizationId": "string",
"permissions": [
"string"
],
"modules": [
"string"
],
"expiresIn": 0
}

Responses

API key created

application/json
JSON
{
"data": {
"id": "string",
"key": "string",
"name": "string",
"prefix": "string",
"organizationId": "string",
"permissions": [
"string"
],
"modules": [
"string"
],
"expiresAt": "string"
}
}

Playground

Body

Samples


Available Options

GET
/api/api-keys/available-options

Get available permissions and modules for configuring API keys.

Responses

Available options

application/json
JSON
{
"permissions": [
{
"id": "string",
"description": "string"
}
],
"modules": [
{
"id": "string",
"name": "string"
}
],
"userRole": "string",
"rolePermissions": [
"string"
]
}

Playground

Samples


Get API Key

GET
/api/api-keys/{id}

Get details of a specific API key.

Parameters

Path Parameters

id*
Typestring
Required

Responses

API key details

application/json
JSON
{
"data": {
"id": "string",
"name": "string",
"prefix": "string",
"start": "string",
"organizationId": "string",
"enabled": true,
"permissions": [
"string"
],
"modules": [
"string"
],
"expiresAt": "string",
"createdAt": "string",
"updatedAt": "string"
}
}

Playground

Variables
Key
Value

Samples


Delete API Key

DELETE
/api/api-keys/{id}

Permanently delete an API key.

Parameters

Path Parameters

id*
Typestring
Required

Responses

API key deleted

Playground

Variables
Key
Value

Samples


Update API Key

PATCH
/api/api-keys/{id}

Update an API key's name, status, permissions, or modules.

Parameters

Path Parameters

id*
Typestring
Required

Request Body

application/json
JSON
{
"name": "string",
"enabled": true,
"permissions": [
"string"
],
"modules": [
"string"
]
}

Responses

API key updated

application/json
JSON
{
"data": {
"id": "string",
"name": "string",
"prefix": "string",
"start": "string",
"organizationId": "string",
"enabled": true,
"permissions": [
"string"
],
"modules": [
"string"
],
"expiresAt": "string",
"createdAt": "string",
"updatedAt": "string"
}
}

Playground

Variables
Key
Value
Body

Samples


Powered by VitePress OpenAPI

AstroAPI Documentation