Authentication

Learn how to authenticate with the Nexlayer API using session tokens.

Base URL

All API requests should be made to:

https://app.nexlayer.io

Session Tokens

Nexlayer uses session tokens for API authentication. When you start a deployment, you receive a sessionToken that identifies your session and grants access to manage your deployments.

!

Important: Save your session token securely. You'll need it for all subsequent API calls to manage your deployment.

Obtaining a Session Token

Session tokens are automatically generated when you create a new deployment using the /startUserDeployment endpoint.

Example Response
{
  "message": "Deployment started successfully",
  "url": "https://jolly-tapir-my-app.alpha.nexlayer.ai",
  "sessionToken": "dCf0NdAQ64j6",
  "applicationName": "my-app",
  "environment": "jolly-tapir"
}

Using Session Tokens

Include your session token in API requests either as a query parameter or in the request body, depending on the endpoint.

Query Parameter
GET /getReservations?sessionToken=dCf0NdAQ64j6
Request Body
POST /extendDeployment
Content-Type: application/json

{
  "sessionToken": "dCf0NdAQ64j6",
  "applicationName": "my-app"
}

Token Lifecycle

Session tokens remain valid as long as you have active deployments or reservations. Once all your deployments are removed or expired, you'll need to start a new deployment to get a fresh token.

Content Types

The Nexlayer API uses different content types depending on the endpoint:

Content TypeUsage
text/x-yamlFor deployment endpoints that accept YAML files
application/jsonFor most other endpoints