Create an API
POST/apis
Register a new upstream service as a proxy target in Relay.
Authentication
Requires a workspace-level access token in the Authorization header.
Body Parameters
workspace_idrequired
integer
The ID of the workspace this API belongs to.
namerequired
string
A human-readable label for this API.
slugrequired
string
A unique URL-friendly identifier for routing requests.
upstream_urlrequired
string
The base URL of your actual backend service.
environment
string
Defaults to
production. Can also be staging or development.description
string
Optional details about this API target.
rate_limit_enabled
boolean
Whether to enforce rate limits on requests through the gateway.
rate_limit_max
integer
Maximum number of requests allowed per window (if enabled).
rate_limit_window
integer
Window duration in seconds (e.g. 60).
Response
Returns the created API object.