Create or update work activity
Creates a new work activity or updates an existing one. If an ID is provided, updates the existing activity; otherwise creates a new one.
Step-by-step process:
- Provide a default activity name (used as fallback when no translation exists)
- Add multilingual translations for the activity name
- Optionally provide an ID to update an existing activity
Multilingual support: Provide translations for activity name. Leadtime automatically displays the correct text based on the user language.
Examples of work activities:
- Development (for developers)
- Management (for project leads)
- Design (for designers)
- Testing (for QA)
- Review (for code reviews)
Note: After creation, assign this activity to specific task types to make it available for time tracking.
POST
/administration/task-settings/activitiesAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredQuery parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsonidstringWork activity ID (optional for create)
namestringrequiredDefault work activity name (used as fallback when no translation exists for user's language)
translationsWorkActivityTranslationDto[]requiredLanguage-specific translations for activity name. Overrides the default name when user's language matches.
Show propertiesHide properties
Array of
WorkActivityTranslationDtolanguagestringrequiredLanguage code following ISO 639-1 format (e.g., "en", "de", "fr")
namestringrequiredTranslated name for this language. Overrides the default name when user's language matches.
Responses
201Work activity created/updated successfully
idstringrequiredWork activity ID
namestringrequiredDefault work activity name (used as fallback when no translation exists for user's language)
sortnumberrequiredSort order
translationsWorkActivityTranslationDto[]requiredLanguage-specific translations for activity name. Overrides the default name when user's language matches.
Show propertiesHide properties
Array of
WorkActivityTranslationDtolanguagestringrequiredLanguage code following ISO 639-1 format (e.g., "en", "de", "fr")
namestringrequiredTranslated name for this language. Overrides the default name when user's language matches.
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/administration/task-settings/activities" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Development",
"translations": [
{
"language": "en",
"name": "Development"
}
]
}'const response = await fetch("https://leadtime.app/api/public/administration/task-settings/activities", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Development",
"translations": [
{
"language": "en",
"name": "Development"
}
]
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/administration/task-settings/activities",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Development",
"translations": [
{
"language": "en",
"name": "Development"
}
]
},
)Response
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Development",
"sort": 1,
"translations": [
{
"language": "en",
"name": "Development"
}
]
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions