Public API Documentation

getTasks Endpoint

The getTasks endpoint provides an authenticated mechanism for retrieving tasks associated with a specific user. Tasks are filtered and returned in reverse chronological order, suitable for use in Zapier integrations or similar services.


Endpoint Overview

  • URL: https://<your-cloud-functions-url>/getTasks
  • Method: GET
  • Authentication: API Key (via x-api-key header)
  • Purpose: Returns tasks associated with the authenticated user, ordered by their last update time in descending order.

Authentication

This endpoint requires an API key for authentication:

  • Include the API key in the request headers:
x-api-key: <your-api-key>

The API key is validated against stored keys in Firestore. If the key is invalid, revoked, or missing, the request will return a 401 Unauthorized response.


Request Parameters

The endpoint does not require query parameters. Tasks are automatically filtered to only include those associated with the authenticated user.


Response Format

The response is a JSON array of task objects. Each object includes the following fields:

FieldTypeDescription
original_idstringThe original ID of the task in the database.
idstringA unique identifier for the task, combining the task ID and updated timestamp.
titlestringThe title of the task.
descriptionstringTask description, including the NeptuneCRM Task ID.
startstringThe start time of the task (ISO-8601 format).
endstringThe end time of the task (ISO-8601 format).
all_daybooleanWhether the task is an all-day event.
created_atstringWhen the task was created (ISO-8601 format).
updated_atstringWhen the task was last updated (ISO-8601 format).
deleted_atstringWhen the task was deleted (ISO-8601 format) or null if not deleted.

Example Response

[
    {
        "original_id": "task123",
        "id": "task123-1672435200000",
        "title": "Install Pool",
        "description": "Install a new pool for John Doe. (NeptuneCRM Task ID: task123)",
        "start": "2024-12-31T10:00:00Z",
        "end": "2024-12-31T11:00:00Z",
        "all_day": false,
        "created_at": "2024-12-29T12:00:00Z",
        "updated_at": "2024-12-30T14:00:00Z",
        "deleted_at": null
    },
    {
        "original_id": "task124",
        "id": "task124-1672521600000",
        "title": "Inspect Pump",
        "description": "Inspect the pool pump for Jane Doe. (NeptuneCRM Task ID: task124)",
        "start": "2024-12-31T15:00:00Z",
        "end": "2024-12-31T16:00:00Z",
        "all_day": false,
        "created_at": "2024-12-29T15:00:00Z",
        "updated_at": "2024-12-30T16:00:00Z",
        "deleted_at": "2024-12-30T17:00:00Z"
    }
]