Tasks API

The Tasks API allows you to create, read, and manage tasks programmatically. Tasks are the core unit of work on the Tewdy platform.

Endpoints

MethodPathScopeDescription
POST/taskstasks:writeCreate a new task
GET/taskstasks:readList your tasks
GET/tasks/exploreBrowse public tasks
GET/tasks/me/statustasks:readGet tasks by status
GET/tasks/me/createdtasks:readGet tasks you created
GET/tasks/:idGet a specific task
DELETE/tasks/:idtasks:writeDelete a task

Create a Task

POST /api/v1/tasks

Creates a new task. Requires tasks:write scope.

Request Body

FieldTypeRequiredDescription
titlestringYesTask title (max 200 chars)
descriptionstringYesTask description
budgetnumberYesBudget amount (min 0)
currencystringYesCurrency code (e.g. EUR, USD)
locationobjectYesLocation object (see below)
requirementstringYesRequirements for task completion
dueDatestringNoISO 8601 date string
maxPeoplenumberNoMaximum number of people (default 1)

Location Object

FieldTypeRequiredDescription
coordinatesnumber[]Yes[longitude, latitude]
typestringYescity, country, world, radius
namestringYesDisplay name
countryCodestringNoISO country code
radiusKmnumberNoRadius in km (required if type is radius, 1-500)

Example

curl -X POST https://api.tewdy.com/api/v1/tasks \
  -H "X-API-Key: tewdy_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Help me move furniture",
    "description": "Need help moving a couch and bookshelf to a new apartment",
    "budget": 50,
    "currency": "EUR",
    "location": {
      "coordinates": [6.1319, 49.6116],
      "type": "city",
      "name": "Luxembourg City",
      "countryCode": "LU"
    },
    "requirement": "Must have a car or van"
  }'

Response 201

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "Help me move furniture",
  "description": "Need help moving a couch and bookshelf to a new apartment",
  "budget": 50,
  "currency": "EUR",
  "status": "published",
  "createdAt": "2026-03-01T12:00:00.000Z"
}

List Tasks

GET /api/v1/tasks

Returns tasks for the authenticated user. Requires tasks:read scope.

Query Parameters

ParameterTypeDescription
limitnumberResults per page (default 20, max 50)
cursorstringPagination cursor from previous response
searchstringSearch title and description
paymentstringFilter: Pro-bono or Paid

Example

curl "https://api.tewdy.com/api/v1/tasks?limit=10" \
  -H "X-API-Key: tewdy_your_api_key_here"

Response 200

[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": "Help me move furniture",
    "budget": 50,
    "currency": "EUR",
    "status": "published",
    "createdAt": "2026-03-01T12:00:00.000Z"
  }
]

Browse Public Tasks

GET /api/v1/tasks/explore

Browse publicly listed tasks. No authentication required.

Query Parameters

ParameterTypeDescription
limitnumberResults per page (default 20, max 50)
cursorstringPagination cursor
searchstringSearch title and description
paymentstringFilter: Pro-bono or Paid
regionNamestringFilter by region name
latitudenumberLatitude for geographic filtering
longitudenumberLongitude for geographic filtering
radiusKmnumberRadius in km for geographic filtering
cityNamestringFilter by city
countryCodestringFilter by country

Example

curl "https://api.tewdy.com/api/v1/tasks/explore?cityName=Luxembourg&countryCode=LU&limit=5"

Get Tasks by Status

GET /api/v1/tasks/me/status

Returns the authenticated user’s tasks filtered by status. Requires tasks:read scope.

Query Parameters

ParameterTypeDescription
statusstringpublished or completed
limitnumberResults per page
pagenumberPage number

Example

curl "https://api.tewdy.com/api/v1/tasks/me/status?status=published" \
  -H "X-API-Key: tewdy_your_api_key_here"

Get Tasks You Created

GET /api/v1/tasks/me/created

Returns all tasks created by the authenticated user. Requires tasks:read scope.

Example

curl "https://api.tewdy.com/api/v1/tasks/me/created" \
  -H "X-API-Key: tewdy_your_api_key_here"

Get a Specific Task

GET /api/v1/tasks/:id

Returns a single task by ID. No authentication required for published tasks.

Path Parameters

ParameterTypeDescription
idstringTask UUID

Example

curl "https://api.tewdy.com/api/v1/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Response 200

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "Help me move furniture",
  "description": "Need help moving a couch and bookshelf to a new apartment",
  "budget": 50,
  "currency": "EUR",
  "status": "published",
  "authorFirstName": "John",
  "authorProfilePic": "https://...",
  "images": [],
  "cities": ["Luxembourg City"],
  "createdAt": "2026-03-01T12:00:00.000Z"
}

Delete a Task

DELETE /api/v1/tasks/:id

Soft-deletes a task. You can only delete tasks you created. Requires tasks:write scope.

Path Parameters

ParameterTypeDescription
idstringTask UUID

Example

curl -X DELETE "https://api.tewdy.com/api/v1/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "X-API-Key: tewdy_your_api_key_here"

Response 200

{
  "message": "Task deleted successfully"
}

Error Responses

StatusCodeDescription
401TOKEN_MISSINGNo API key or JWT provided
401API_KEY_INVALIDInvalid or expired API key
403SCOPE_INSUFFICIENTAPI key lacks required scope
404NOT_FOUNDTask not found