Skip to main content

Getting Started

Welcome to the TaskSocial API. TaskSocial provides a REST API for creating accounts, authenticating users, and creating and managing accountability tasks. This guide walks you through the basic flow of using the API.

API Base URL

During local development, the API runs at:
All API endpoints are available under the /api/v1 path. For example:

What You Can Do

With the TaskSocial API, you can:
  • Create a user account
  • Log in and authenticate
  • Create tasks
  • View your tasks
  • View the shared task feed
  • Update your tasks
  • Delete your tasks
  • Log out

Typical API Flow

A typical session looks like this:

1. Create an Account

First, register a new user using:
Example request:
If registration is successful, the API returns the newly created user’s information.

2. Log In

After creating an account, log in using:
Example request:
The server verifies the credentials and creates a JWT. The JWT is stored in an HttpOnly tokenName cookie. You don’t need to manually create an API key.

3. Use Protected Endpoints

After logging in, authenticated requests use the tokenName cookie. For example:
The backend reads and verifies the JWT before allowing the request to continue.

4. Create a Task

Once authenticated, you can create a task:
Example request:
The task is associated with the authenticated user.

5. Manage Your Tasks

You can then use the task endpoints to:
  • Get your tasks
  • View the shared task feed
  • Update a task
  • Delete a task
See the API Reference for the complete list of endpoints, request schemas, responses, and examples.

6. Log Out

When you’re finished, use:
The server clears the authentication cookie.

What’s Next?

Now that you understand the basic API flow, continue with:
  • Authentication — understand how JWT authentication and HttpOnly cookies work.
  • Creating Your First Task — create and manage a task step by step.
  • API Testing — test the API using Postman.