User-scoped endpoints return information about the caller — currently the bound user record plus the primary organization. Future endpoints (token list, preferences, notification settings) will land here.
Get the current authenticated user
Authorization
bearer A Harmont session bearer token.
In: header
Response Body
application/json
curl -X GET "https://api.harmont.dev/api/v0/user"{
"email": "string",
"name": "string",
"personal_org_slug": "string",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
}Update the current user's display name
Authorization
bearer A Harmont session bearer token.
In: header
Request Body
application/json
Profile update
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://api.harmont.dev/api/v0/user" \ -H "Content-Type: application/json" \ -d '{ "name": "Ada Lovelace" }'{
"email": "string",
"name": "string",
"personal_org_slug": "string",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}Delete the current user's account
Authorization
bearer A Harmont session bearer token.
In: header
Response Body
application/json
curl -X DELETE "https://api.harmont.dev/api/v0/user"{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}List the current user's API keys
Authorization
bearer A Harmont session bearer token.
In: header
Response Body
application/json
curl -X GET "https://api.harmont.dev/api/v0/user/api-tokens"{
"api_tokens": [
{
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"last_used_at": "2019-08-24T14:15:22Z"
}
]
}Create a personal API key
Authorization
bearer A Harmont session bearer token.
In: header
Request Body
application/json
Create request
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.harmont.dev/api/v0/user/api-tokens" \ -H "Content-Type: application/json" \ -d '{ "description": "Laptop CLI", "expires_at": null }'{
"api_token": {
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"last_used_at": "2019-08-24T14:15:22Z"
},
"token": "string"
}Revoke one of the current user's API keys
Authorization
bearer A Harmont session bearer token.
In: header
Path Parameters
The API key id.
Response Body
application/json
curl -X DELETE "https://api.harmont.dev/api/v0/user/api-tokens/string"{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}