Skip to main content

Platform Core API

Liara’s Platform Core API covers the cross-service operations that are not tied to a single runtime product such as PaaS or DBaaS: account lifecycle, team collaboration, billing, and support.

What’s inside

  • Authentication & Account — login, API tokens, password changes and resets, two-factor authentication, email and phone verification, profile and billing contact details
  • Teams & Access — teams, invitations, members, custom roles, and per-resource permissions
  • Billing & Subscription — credit, payments, invoices, receipts, discount codes, and subscription plans
  • Support & Notifications — support tickets, comments, attachments, notification channels, and preferences

Base URL

Authentication

Send your API token in the Authorization header:
Get a token from the Liara Console, by logging in with POST /v1/login, or, once logged in, with POST /v1/api-token.
  • Tokens are valid for 30 days by default. POST /v1/login and POST /v1/api-token accept an expiresIn query parameter (1h, 1d, 7d, 30d, 180d or 1y).
  • Changing or resetting your password makes every previously issued token stop working.
  • A missing, invalid or expired token returns 401 with {"error": "Unauthorized."}. A banned account gets 403 with {"error": "Banned."}.
Endpoints that don’t need a token are marked in the endpoint reference.

Working with a team

Tokens always belong to a person. To act on a team’s resources, add the team’s ID as the teamID query parameter:
What you can do in the team depends on your role and permissions there:
  • An invalid teamID returns 400 with the message Invalid team ID.
  • A team you aren’t a member of returns 403 with data.code set to team_not_found.
  • An action your role or permissions don’t allow returns 403 with data.code set to no_permission.

Errors

Most errors use this JSON body:
  • message is human-readable and may change. When data.code is present, it’s a stable, machine-readable code you can branch on. data can be null.
  • Invalid request bodies or parameters return 400 with a message naming the field, and no data.
  • account_verification_required means you need to set your full name and verify your email address, phone number and national code before creating services or tokens.
  • An unknown path returns 404 with {"error": "Not Found"}.

Rate limits

Some endpoints, such as login, password reset and verification codes, are rate limited. Exceeding a limit returns 429 Too Many Requests. Explore the endpoint references in this section for full request bodies, response schemas, and error codes.