APIPersonal data

Set a visited country

PUT
/api/v1/visited-countries

Authorization

bearerAuth visited_countries.write
headerAuthorizationBearer <API key or OAuth 2.1 access token>

Send Authorization: Bearer <credential>. Create API keys in AirTrail Security settings. OAuth clients use authorization code with PKCE S256 and a resource identifier matching /api/v1.

Scope: visited_countries.write

Request Body

application/json
  1. body
code*string
Length2 <= length <= 2
status*string
Value in"lived""visited""layover""wishlist"
note?|
Lengthlength <= 1000

Response Body

Saved country.

application/json
  1. response
data*
Example Request
curl -X PUT 'https://your-instance.example/api/v1/visited-countries' \  -H 'Content-Type: application/json' \  -d '{  "code": "st",  "status": "lived"}'
Example Response
{  "data": {    "id": 0,    "code": "st",    "status": "lived",    "note": "string"  }}