POST/v1/auth/check-session
Validate API key session
Confirms that the bearer token and X-Travelandz-Id header resolve to an active developer profile and API key for the current environment.
Confirms that the bearer token and X-Travelandz-Id header resolve to an active developer profile and API key for the current environment.
Endpoint
| Method | Path | Auth |
|---|---|---|
POST | /v1/auth/check-session | Required API key |
| Header | Description |
|---|---|
Authorization | Bearer <secret_key>. The secret is shown only once when the credential is created. |
X-Travelandz-Id | <public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential. |
Content-Type | Use application/json for requests with a body. |
Success Response
json
{
"session": {
"profileCode": "dp_a1b2c3d4e5f6"
}
}Example
bash
curl -X POST https://api.sandbox.travelandz.com/v1/auth/check-session \
-H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
-H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"