Skip to main content
The Moonshadow REST API lets you programmatically manage workspaces, users, integrations, and events. This page covers the fundamentals you need before making your first call, including the base URL, how to authenticate, how responses are paginated, and how to safely retry requests without side effects.

Base URL

All API requests use the following base URL:
Send requests over HTTPS only. Unencrypted HTTP requests are rejected.

Authentication

Authenticate every request with an API key using the Authorization header in Bearer format. You can create and manage API keys from your Moonshadow dashboard under Settings > API Keys.
Treat your API keys like passwords. Do not commit them to version control or expose them in client-side code.

Versioning

The current API version is v1. The version is part of the base URL:
Moonshadow follows a deprecation policy for API changes. When a breaking change is introduced, a new version is released and the previous version is supported for at least 6 months. Deprecation notices are posted in the Changelog.

Pagination

List endpoints return collections using cursor-based pagination. Include a cursor query parameter to fetch the next page of results.

Query Parameters

integer
default:"20"
Number of items to return per page. Maximum is 100.
string
Opaque cursor value from the previous response’s next_cursor field.

Example Response

When has_more is false, you have reached the final page.

Idempotency

To safely retry requests without creating duplicate resources, include an Idempotency-Key header with a unique client-generated identifier. Moonshadow stores the response for 24 hours and returns the cached result for duplicate keys.
Use UUID v4 strings for idempotency keys to guarantee uniqueness across clients.

Content Type

All request bodies must be valid JSON with the Content-Type: application/json header. Responses are returned as JSON.

Errors

Moonshadow uses conventional HTTP status codes. Error responses include a JSON body with error and message fields.
For a full list of error codes, retry guidance, and status code meanings, see the Errors Reference.

Rate Limits

The API enforces a rate limit of 1000 requests per minute per workspace. Exceeding this limit returns a 429 Too Many Requests response. For details, see Rate Limits.

Next Steps

Workspaces API

Create and manage team workspaces.

Users API

Manage members and roles in workspaces.

Integrations API

Connect and manage external tool integrations.

Events API

Query and subscribe to events from integrations.