Users
Get a user by Auth0 subtoken
GET /api/v1/users/:subtoken
Get publicly available information about a user using their subtoken
Depending on the user’s privacy settings, some user information may not be present.
Parameters
Path
subtoken string | The Auth0 subtoken associated with the given Trek user account |
Response Codes
Status code | Description |
---|---|
200 | OK |
404 | Not found |
Code samples for "Get a user by Auth0 subtoken"
curl -L \
http://localhost:3000/api/v1/users/auth0|abcdefg123456
- Private profile response
- Public profile response
- Response schema
status: 200
{
"_id": "1234567asdfghjkl",
"sub": "auth0|abcdefg123456",
"name": "Gregor Kiczales",
"username": "gregork",
"image": "https://s.gravatar.com/avatar/gregork_picture",
"uploadedProfilePicture": "abcdefghijk",
"uploadedProfilePictureURL": "https://cpsc-455-trek-users.s3.us-east-2.amazonaws.com/12345678900.jpeg",
"email": "gregork@example.com",
"trips": ["389c6c16-1094-4901-a062-ab71e14398e5", "389c6c16-1094-4901-a062-ab71e14398e0"]
}
status: 200
{
"_id": "1234567asdfghjkl",
"sub": "auth0|abcdefg123456",
"name": "Gregor Kiczales",
"username": "gregork",
"image": "https://s.gravatar.com/avatar/gregork_picture",
"uploadedProfilePicture": "abcdefghijk",
"uploadedProfilePictureURL": "https://cpsc-455-trek-users.s3.us-east-2.amazonaws.com/12345678900.jpeg",
"email": "gregork@example.com",
"description": "Father of all CS students, king of the natural recursion, and the master of the AOP.",
"links": [
{
"type": "twitter",
"url": "https://twitter.com/gregork"
},
{
"type": "site",
"url": "https://cs.ubc.ca/~gregor"
}
],
"interests": ["Island", "Ocean", "Hiking", "Nature", "Recursion"],
"home": "Vancouver, BC",
"currentlyAt": "UBC",
"trips": ["389c6c16-1094-4901-a062-ab71e14398e5", "389c6c16-1094-4901-a062-ab71e14398e0"]
}
{
"_id": "ObjectID",
"sub": "string"
"name": "string",
"username": "string",
"image": "string",
"uploadedProfilePicture?": "ObjectID",
"uploadedProfilePictureURL?": "string",
"email": "string"
"description?": "string",
"links?": "Array<{type: string, url: string}">,
"interests?": "Array<string>",
"home?": "string",
"currentlyAt?": "string",
"trips": "Array<UUID>"
}
Get a user by username
GET /api/v1/users/username/:username
Get publicly available information about a user
Depending on the user’s privacy settings, some user information may not be present.
Parameters
Path
username string | The handle for the Trek user account |
Response Codes
Status code | Description |
---|---|
200 | OK |
404 | Not found |
Code samples for "Get a user"
curl -L \
http://localhost:3000/api/v1/users/username/gregork
- Private profile response
- Public profile response
- Response schema
status: 200
{
"_id": "1234567asdfghjkl",
"sub": "auth0|abcdefg123456",
"name": "Gregor Kiczales",
"username": "gregork",
"image": "https://s.gravatar.com/avatar/gregork_picture",
"uploadedProfilePicture": "abcdefghijk",
"uploadedProfilePictureURL": "https://cpsc-455-trek-users.s3.us-east-2.amazonaws.com/12345678900.jpeg",
"email": "gregork@example.com",
"trips": ["389c6c16-1094-4901-a062-ab71e14398e5", "389c6c16-1094-4901-a062-ab71e14398e0"]
}
status: 200
{
"_id": "1234567asdfghjkl",
"sub": "auth0|abcdefg123456",
"name": "Gregor Kiczales",
"username": "gregork",
"image": "https://s.gravatar.com/avatar/gregork_picture",
"uploadedProfilePicture": "abcdefghijk",
"uploadedProfilePictureURL": "https://cpsc-455-trek-users.s3.us-east-2.amazonaws.com/12345678900.jpeg",
"email": "gregork@example.com",
"description": "Father of all CS students, king of the natural recursion, and the master of the AOP.",
"links": [
{
"type": "twitter",
"url": "https://twitter.com/gregork"
},
{
"type": "site",
"url": "https://cs.ubc.ca/~gregor"
}
],
"interests": ["Island", "Ocean", "Hiking", "Nature", "Recursion"],
"home": "Vancouver, BC",
"currentlyAt": "UBC",
"trips": ["389c6c16-1094-4901-a062-ab71e14398e5", "389c6c16-1094-4901-a062-ab71e14398e0"]
}
{
"_id": "ObjectID",
"sub": "string"
"name": "string",
"username": "string",
"image": "string",
"uploadedProfilePicture?": "ObjectID",
"uploadedProfilePictureURL?": "string",
"email": "string"
"description?": "string",
"links?": "Array<{type: string, url: string}">,
"interests?": "Array<string>",
"home?": "string",
"currentlyAt?": "string",
"trips": "Array<UUID>"
}
Get a user's profile picture
GET /api/v1/users/:subtoken/picture
Get the profile picture of the given username
Parameters
Header
Path
subtoken string | The Auth0 subtoken associated with the given Trek user account |
Response Codes
Status code | Description |
---|---|
200 | OK |
404 | Not found |
Code samples for "Get a user's profile picture"
curl -L \
http://localhost:3000/api/v1/users/auth0|abcdefg123456/picture
- Example response
- Response schema
{
"_id": "1234567asdfghjkl",
"sub": "auth0|abcdefg123456"
"image": "https://s.gravatar.com/avatar/gregork_picture",
"uploadedProfilePicture": "abcdefghijk",
"uploadedProfilePictureURL": "https://cpsc-455-trek-users.s3.us-east-2.amazonaws.com/12345678900.jpeg"
}
{
"_id": "ObjectID",
"image": "string",
"uploadedProfilePicture?": "ObjectID",
"uploadedProfilePictureURL?": "string",
}
Get the authenticated user
GET /api/v1/users
Get profile information about the currently authenticated user.
Parameters
Header
token string | The user access token |
Response Codes
Status code | Description |
---|---|
200 | OK |
401 | Unauthorized |
404 | Not found |
Code samples for "Get the authenticated user"
curl -L \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http://localhost:3000/api/v1/users
- Example response
- Response schema
status: 200
{
"_id": "1234567asdfghjkl",
"sub": "auth0|abcdefg123456",
"name": "Gregor Kiczales",
"username": "gregork",
"image": "https://s.gravatar.com/avatar/gregork_picture",
"uploadedProfilePicture": "abcdefghijk",
"uploadedProfilePictureURL": "https://cpsc-455-trek-users.s3.us-east-2.amazonaws.com/12345678900.jpeg",
"email": "gregork@example.com",
"description": "Father of all CS students, king of the natural recursion, and the master of the AOP.",
"links": [
{
"type": "twitter",
"url": "https://twitter.com/gregork"
},
{
"type": "site",
"url": "https://cs.ubc.ca/~gregor"
}
],
"interests": ["Island", "Ocean", "Hiking", "Nature", "Recursion"],
"home": "Vancouver, BC",
"currentlyAt": "UBC",
"settings": {
"accountLimitedDeals": true,
"accountNewsletterNotifications": false,
"privateAccount": true
},
"experience": {
"accommodationBudget": {
"lo": 0,
"hi": 1000
},
"activities": [],
"activitiesBudget": {
"lo":0,
"hi": 1000
},
"ageRange": 20,
"climateAndWeather": [],
"connectivityNeeds": "No connectivity needed",
"culture": [],
"dining": [],
"diningBudget": {
"lo": 0,
"hi": 1000
},
"healthAndAccessibility": "",
"language": "Comfortable with different language",
"occupation": "Employed",
"passports": [],
"safety": "",
"tosAgreement": false,
"transportPreferences": [],
"travelFrequency": "2-4 times a year",
"travelStyle": [],
"tripDuration": "",
"visas": []
},
"trips": ["389c6c16-1094-4901-a062-ab71e14398e5", "389c6c16-1094-4901-a062-ab71e14398e0"]
}
{
"_id": "ObjectID",
"sub": "string"
"name": "string",
"username": "string",
"image": "string",
"uploadedProfilePicture?": "ObjectID",
"uploadedProfilePictureURL?": "string",
"email": "string"
"description?": "string",
"links?": "Array<{type: string, url: string}">,
"interests?": "Array<string>",
"home?": "string",
"currentlyAt?": "string",
"settings": {
"accountLimitedDeals": "boolean",
"accountNewsletterNotifications": "boolean",
"privateAccount": "boolean"
},
"experience": {
"accommodationBudget": {
"lo": "number",
"hi": "number"
},
"activities": "Array<string>",
"activitiesBudget": {
"lo": "number",
"hi": "number"
},
"ageRange": "number",
"climateAndWeather": "Array<string>",
"connectivityNeeds": "string (enum)",
"culture": "Array<string>",
"dining": "Array<string>",
"diningBudget": {
"lo": "number",
"hi": "number"
},
"healthAndAccessibility": "string",
"language": "string (enum)",
"occupation": "string (enum)",
"passports": "Array<string>",
"safety": "string",
"tosAgreement": "boolean",
"transportPreferences": "Array<string>",
"travelFrequency": "string (enum)",
"travelStyle": "Array<string>",
"tripDuration": "string",
"visas": "Array<string>"
},
"trips": "Array<UUID>"
}
Get authenticated user's settings
GET /api/v1/users/settings
Get all the settings for the currently authenticated user
Parameters
Header
token string | The user access token |
Response Codes
Status code | Description |
---|---|
200 | OK |
401 | Unauthorized |
404 | Not found |
Code samples for "Get authenticated user settings"
curl -L \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http://localhost:3000/api/v1/users/settings
- Example response
- Response schema
status: 200
{
"accountLimitedDeals": false,
"accountNewsletterNotifications": false,
"privateAccount": true
}
{
"accountLimitedDeals": "boolean",
"accountNewsletterNotifications": "boolean",
"privateAccount": "boolean"
}
Create a new user with Auth0
POST /api/v1/users/fetch-user
Creates a new user
Parameters
Header
token string | The user access token |
Body
sub string | The new user's Auth0 subtoken |
name string | The new user's display name |
email string | The new user's Auth0 login email |
image string | The link to the user's default Auth0-provided profile picture |
Response Codes
Status code | Description |
---|---|
200 | OK |
400 | Bad request |
401 | Unauthorized |
Code samples for "Create a new user"
curl -L \
-X POST \
http://localhost:3000/api/v1/users/fetch-user \
-d '{"sub": "auth0|abcdefg123456", "name": "Gregor",
"email": "gregork@example.com", "image": "https://s.gravatar.com/avatar/gregork_picture"}'
- Example response
- Response schema
status: 200
{
"_id": "a87sdhf-9h3iuhfsd-i923hie"
"sub": "auth0|abcdefg123456",
"name": "Gregor",
"username": "gregork",
"image": "https://s.gravatar.com/avatar/gregork_picture",
"email": "gregork@example.com"
"settings": {
"accountLimitedDeals": true,
"accountNewsletterNotifications": true,
"privateAccount": false
},
"experience": {
"accommodationBudget": {
"lo": 0,
"hi": 1000
},
"activities": [],
"activitiesBudget": {
"lo": 0,
"hi": 1000
},
"ageRange": 18,
"climateAndWeather": [],
"connectivityNeeds": "",
"culture": [],
"dining": [],
"diningBudget": {
"lo": 0,
"hi": 1000
},
"healthAndAccessibility": "",
"language": "",
"occupation": "",
"passports": [],
"safety": "",
"tosAgreement": false,
"transportPreferences": [],
"travelFrequency": "",
"travelStyle": [],
"tripDuration": "",
"visas": []
},
"trips": []
}
{
"_id": "ObjectID",
"sub": "string"
"name": "string",
"username": "string",
"image": "string",
"email": "string"
"settings": {
"accountLimitedDeals": "boolean",
"accountNewsletterNotifications": "boolean",
"privateAccount": "boolean"
},
"experience": {
"accommodationBudget": {
"lo": "number",
"hi": "number"
},
"activities": "Array<string>",
"activitiesBudget": {
"lo": "number",
"hi": "number"
},
"ageRange": "number",
"climateAndWeather": "Array<string>",
"connectivityNeeds": "string (enum)",
"culture": "Array<string>",
"dining": "Array<string>",
"diningBudget": {
"lo": "number",
"hi": "number"
},
"healthAndAccessibility": "string",
"language": "string (enum)",
"occupation": "string (enum)",
"passports": "Array<string>",
"safety": "string",
"tosAgreement": "boolean",
"transportPreferences": "Array<string>",
"travelFrequency": "string (enum)",
"travelStyle": "Array<string>",
"tripDuration": "string",
"visas": "Array<string>"
},
"trips": "Array<UUID>"
}
Update a user's settings
PUT /api/v1/users/:subtoken/settings
Update the settings of a user with specified username
Parameters
Header
token string | The user access token |
Path
subtoken string | The Auth0 subtoken associated with the given Trek user account |
Body
accountLimitedDeals boolean | Email for limited deals toggle |
accountNewsletterNotifications boolean | Email for newsletter toggle |
privateAccount boolean | Setting for whether the account is private or not |
Response Codes
Status code | Description |
---|---|
200 | OK |
304 | Not modified |
401 | Unauthorized |
404 | Not found |
Code samples for "Update a user's settings"
curl -L \
-X PUT \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http://localhost:3000/api/v1/users/auth0|abcdefg123456/settings \
-d '{"accountLimitedDeals": true}'
- Example response
- Response schema
status: 200
{
"accountLimitedDeals": true,
"accountNewsletterNotifications": false,
"privateAccount": false
}
{
"accountLimitedDeals": "boolean",
"accountNewsletterNotifications": "boolean",
"privateAccount": "boolean"
}
Edit a user's experience data for the chatbot
PUT /api/v1/users/:subtoken/experience
Edits a user's profile information
Parameters
Header
token string | The user access token |
Path
subtoken string | The Auth0 subtoken associated with the given Trek user account |
Body
accommodationBudget {lo : number, hi : number} | The budget range the user has for their accomodation |
activities Array<string> | The activities the user enjoys |
activitiesBudget {lo : number, hi : number} | The budget range the user has for activities |
ageRange number | The approximate age of the user |
climateAndWeather Array<string> | The climate preferences of the user |
connectivityNeeds string (enum) | The connectivity needs of the user |
culture Array<string> | The cultural preferences of the user |
dining Array<string> | The dining preferences of the user |
diningBudget {lo : number, hi : number} | The budget range the user has for their dining options |
healthAndAccessibility string | The user's health and accessibility needs |
language string (enum) | The user's language preferences |
occupation string (enum) | The user's employment status |
passports Array<string> | The passports the user has |
safety string | The user's safety preferences |
tosAgreement boolean | If the user consents to the use of their information in the chatbot |
transportPreferences Array<string> | The user's preferences in terms of transportation methods |
travelFrequency string (enum) | The user's travel frequency |
travelStyle Array<string> | The user's preferred travel style |
tripDuration string | The user's preferred trip duration |
visas Array<string> | The visas the user has access to |
Response Codes
Status code | Description |
---|---|
200 | OK |
400 | Bad request |
401 | Unauthorized |
404 | Not found |
Code samples for "Edit a user's profile picture"
curl -L \
-X PUT
-H "Authorization: Bearer <YOUR-TOKEN>" \
http://localhost:3000/api/v1/users/auth0|abcdefg123456/experience \
-d '{"language": "Prefer English-speaking countries" }'
- Example response
- Response schema
status: 200
{
"accommodationBudget": {
"lo": 0,
"hi": 1000
},
"activities": [],
"activitiesBudget": {
"lo": 0,
"hi": 1000
},
"ageRange": 18,
"climateAndWeather": [],
"connectivityNeeds": "",
"culture": [],
"dining": [],
"diningBudget": {
"lo": 0,
"hi": 1000
},
"healthAndAccessibility": "",
"language": "",
"occupation": "",
"passports": [],
"safety": "",
"tosAgreement": false,
"transportPreferences": [],
"travelFrequency": "",
"travelStyle": [],
"tripDuration": "",
"visas": []
}
{
"accommodationBudget": {
"lo": "number",
"hi": "number"
},
"activities": "Array<string>",
"activitiesBudget": {
"lo": "number",
"hi": "number"
},
"ageRange": "number",
"climateAndWeather": "Array<string>",
"connectivityNeeds": "string (enum)",
"culture": "Array<string>",
"dining": "Array<string>",
"diningBudget": {
"lo": "number",
"hi": "number"
},
"healthAndAccessibility": "string",
"language": "string (enum)",
"occupation": "string (enum)",
"passports": "Array<string>",
"safety": "string",
"tosAgreement": "boolean",
"transportPreferences": "Array<string>",
"travelFrequency": "string (enum)",
"travelStyle": "Array<string>",
"tripDuration": "string",
"visas": "Array<string>"
}
Edit a user's user-uploaded profile picture
PUT /api/v1/users/:subtoken/picture
Edits a user's profile picture
Parameters
Header
token string | The user access token |
Path
subtoken string | The Auth0 subtoken associated with the given Trek user account |
Body
accommodationBudget | The image file corresponding to the new profile picture |
Response Codes
Status code | Description |
---|---|
200 | OK |
400 | Bad request |
401 | Unauthorized |
404 | Not found |
Code samples for "Edit a user's profile picture"
curl -L \
-X PUT
-H "Authorization: Bearer <YOUR-TOKEN>" \
http://localhost:3000/api/v1/users/auth0|abcdefg123456 \
-d '{"uploadedProfilePicture": ... }'
- Example response
- Response schema
status: 200
{
"_id": "1234567asdfghjkl",
"sub": "auth0|abcdefg123456",
"name": "Gregor Kiczales",
"username": "gregork",
"image": "https://s.gravatar.com/avatar/gregork_picture",
"uploadedProfilePicture": "abcdefghijk",
"uploadedProfilePictureURL": "https://cpsc-455-trek-users.s3.us-east-2.amazonaws.com/12345678900.jpeg",
"email": "gregork@example.com",
"description": "Father of all CS students, king of the natural recursion, and the master of the AOP.",
"links": [
{
"type": "twitter",
"url": "https://twitter.com/gregork"
},
{
"type": "site",
"url": "https://cs.ubc.ca/~gregor"
}
],
"interests": ["Island", "Ocean", "Hiking", "Nature", "Recursion"],
"home": "Vancouver, BC",
"currentlyAt": "UBC",
"settings": {
"accountLimitedDeals": true,
"accountNewsletterNotifications": false,
"privateAccount": true
},
"experience": {
"accommodationBudget": {
"lo": 0,
"hi": 1000
},
"activities": [],
"activitiesBudget": {
"lo":0,
"hi": 1000
},
"ageRange": 20,
"climateAndWeather": [],
"connectivityNeeds": "No connectivity needed",
"culture": [],
"dining": [],
"diningBudget": {
"lo": 0,
"hi": 1000
},
"healthAndAccessibility": "",
"language": "Comfortable with different language",
"occupation": "Employed",
"passports": [],
"safety": "",
"tosAgreement": false,
"transportPreferences": [],
"travelFrequency": "2-4 times a year",
"travelStyle": [],
"tripDuration": "",
"visas": []
},
"trips": ["389c6c16-1094-4901-a062-ab71e14398e5", "389c6c16-1094-4901-a062-ab71e14398e0"]
}
{
"_id": "ObjectID",
"sub": "string"
"name": "string",
"username": "string",
"image": "string",
"uploadedProfilePicture?": "ObjectID",
"uploadedProfilePictureURL?": "string",
"email": "string"
"description?": "string",
"links?": "Array<{type: string, url: string}">,
"interests?": "Array<string>",
"home?": "string",
"currentlyAt?": "string",
"settings": {
"accountLimitedDeals": "boolean",
"accountNewsletterNotifications": "boolean",
"privateAccount": "boolean"
},
"experience": {
"accommodationBudget": {
"lo": "number",
"hi": "number"
},
"activities": "Array<string>",
"activitiesBudget": {
"lo": "number",
"hi": "number"
},
"ageRange": "number",
"climateAndWeather": "Array<string>",
"connectivityNeeds": "string (enum)",
"culture": "Array<string>",
"dining": "Array<string>",
"diningBudget": {
"lo": "number",
"hi": "number"
},
"healthAndAccessibility": "string",
"language": "string (enum)",
"occupation": "string (enum)",
"passports": "Array<string>",
"safety": "string",
"tosAgreement": "boolean",
"transportPreferences": "Array<string>",
"travelFrequency": "string (enum)",
"travelStyle": "Array<string>",
"tripDuration": "string",
"visas": "Array<string>"
},
"trips": "Array<UUID>"
}
Edit a user's profile
PUT /api/v1/users/:subtoken
Edits a user's profile information
Parameters
Header
token string | The user access token |
Path
subtoken string | The Auth0 subtoken associated with the given Trek user account |
Body
name string | The new name of the user |
description string | The new description of the Trek user |
links Array<{type: string, url: string}> | The new links of the Trek user |
interests Array<string> | The new interests of the Trek user |
home string | The user's area of residence |
currentlyAt string | The user's approximate current location |
trips Array<ObjectID> | The list of trips the user is an owner of |
Response Codes
Status code | Description |
---|---|
200 | OK |
400 | Bad request |
401 | Unauthorized |
404 | Not found |
Code samples for "Edit a user's profile"
curl -L \
-X PUT
-H "Authorization: Bearer <YOUR-TOKEN>" \
http://localhost:3000/api/v1/users/auth0|abcdefg123456 \
-d '{"description":"Professor at the University of British Columbia. Father of all CS students, king of the natural recursion, and the master of the AOP."}'
- Example response
- Response schema
status: 200
{
"_id": "1234567asdfghjkl",
"sub": "auth0|abcdefg123456",
"name": "Gregor Kiczales",
"username": "gregork",
"image": "https://s.gravatar.com/avatar/gregork_picture",
"uploadedProfilePicture": "abcdefghijk",
"uploadedProfilePictureURL": "https://cpsc-455-trek-users.s3.us-east-2.amazonaws.com/12345678900.jpeg",
"email": "gregork@example.com",
"description": "Father of all CS students, king of the natural recursion, and the master of the AOP.",
"links": [
{
"type": "twitter",
"url": "https://twitter.com/gregork"
},
{
"type": "site",
"url": "https://cs.ubc.ca/~gregor"
}
],
"interests": ["Island", "Ocean", "Hiking", "Nature", "Recursion"],
"home": "Vancouver, BC",
"currentlyAt": "UBC",
"settings": {
"accountLimitedDeals": true,
"accountNewsletterNotifications": false,
"privateAccount": true
},
"experience": {
"accommodationBudget": {
"lo": 0,
"hi": 1000
},
"activities": [],
"activitiesBudget": {
"lo":0,
"hi": 1000
},
"ageRange": 20,
"climateAndWeather": [],
"connectivityNeeds": "No connectivity needed",
"culture": [],
"dining": [],
"diningBudget": {
"lo": 0,
"hi": 1000
},
"healthAndAccessibility": "",
"language": "Comfortable with different language",
"occupation": "Employed",
"passports": [],
"safety": "",
"tosAgreement": false,
"transportPreferences": [],
"travelFrequency": "2-4 times a year",
"travelStyle": [],
"tripDuration": "",
"visas": []
},
"trips": ["389c6c16-1094-4901-a062-ab71e14398e5", "389c6c16-1094-4901-a062-ab71e14398e0"]
}
{
"_id": "ObjectID",
"sub": "string"
"name": "string",
"username": "string",
"image": "string",
"uploadedProfilePicture?": "ObjectID",
"uploadedProfilePictureURL?": "string",
"email": "string"
"description?": "string",
"links?": "Array<{type: string, url: string}">,
"interests?": "Array<string>",
"home?": "string",
"currentlyAt?": "string",
"settings": {
"accountLimitedDeals": "boolean",
"accountNewsletterNotifications": "boolean",
"privateAccount": "boolean"
},
"experience": {
"accommodationBudget": {
"lo": "number",
"hi": "number"
},
"activities": "Array<string>",
"activitiesBudget": {
"lo": "number",
"hi": "number"
},
"ageRange": "number",
"climateAndWeather": "Array<string>",
"connectivityNeeds": "string (enum)",
"culture": "Array<string>",
"dining": "Array<string>",
"diningBudget": {
"lo": "number",
"hi": "number"
},
"healthAndAccessibility": "string",
"language": "string (enum)",
"occupation": "string (enum)",
"passports": "Array<string>",
"safety": "string",
"tosAgreement": "boolean",
"transportPreferences": "Array<string>",
"travelFrequency": "string (enum)",
"travelStyle": "Array<string>",
"tripDuration": "string",
"visas": "Array<string>"
},
"trips": "Array<UUID>"
}
Delete a user
DELETE /api/v1/users/:subtoken
Deletes the user with the specified username
Parameters
Header
token string | The user access token |
Path
subtoken string | The Auth0 subtoken associated with the given Trek user account |
Response Codes
Status code | Description |
---|---|
204 | No Content |
401 | Unauthorized |
404 | Not found |
Code samples for "Delete a user"
curl -L \
-X DELETE
-H "Authorization: Bearer <YOUR-TOKEN>" \
http://localhost:3000/api/v1/users/auth0|abcdefg123456
- No response body