Tasks


Search

Search for tasks.

Endpoint

Method URI Description
GET /users/{user_id}/tasks Search user owned tasks
GET /teams/{team_id}/tasks Search team owned tasks
GET /contacts/{contact_id}/tasks Search contact owned tasks

Example Response

{
    "data": [
        {
            "id": 1,
            "key": "b62420f0-5a77-4895-bac5-1b4e3680d909",
            "name": "Follow Up",
            "description": null,
            "due_date": "2020-07-07",
            "due_time": "08:30:00",
            "owner_type": "users",
            "owner_id": 1,
            "subject_type": "contacts",
            "subject_id": 1,
            "assignee_type": "Owner",
            "assignee_id": 1,
            "assignee_email": "[email protected]",
            "assignee_first_name": "Gus",
            "assignee_last_name": "Grasshopper",
            "assignee_full_name": "Gus Grasshopper",
            "assignee": {
                "email": "[email protected]",
                "first_name": "Gus",
                "last_name": "Grasshopper",
                "full_name": "Gus Grasshopper"
            },
            "completed_at": null,
            "created_at": "2020-07-07T02:11:59Z",
            "updated_at": "2020-07-07T02:11:59Z",
            "deleted_at": null
        }
    ],
    "links": {
        "first": "https://api.happygrasshopper.com/v3/users/77179/tasks?page=1",
        "last": "https://api.happygrasshopper.com/v3/users/77179/tasks?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.happygrasshopper.com/v3/users/77179/tasks",
        "per_page": 15,
        "to": 1,
        "total": 1
    }
}

Create

Create a task.

Endpoint

Method URI Description
POST /users/{user_id}/tasks Create a user owned task

Body Params

{
    "name": "Follow Up",
    "description": null,
    "due_date": "2020-07-07",
    "due_time": "08:30:00",
    "subject_type": "contacts",
    "subject_id": 1,
    "assignee_type": "Owner",
    "assignee_id": 1,
    "assignee_email": "[email protected]",
    "assignee_first_name": "Gus",
    "assignee_last_name": "Grasshopper"
}

Example Response

{
    "id": 1,
    "key": "b62420f0-5a77-4895-bac5-1b4e3680d909",
    "name": "Follow Up",
    "description": null,
    "due_date": "2020-07-07",
    "due_time": "08:30:00",
    "owner_type": "users",
    "owner_id": 1,
    "subject_type": "contacts",
    "subject_id": 1,
    "assignee_type": "Owner",
    "assignee_id": 1,
    "assignee_email": "[email protected]",
    "assignee_first_name": "Gus",
    "assignee_last_name": "Grasshopper",
    "assignee_full_name": "Gus Grasshopper",
    "assignee": {
        "email": "[email protected]",
        "first_name": "Gus",
        "last_name": "Grasshopper",
        "full_name": "Gus Grasshopper"
    },
    "completed_at": null,
    "created_at": "2020-07-07T02:11:59Z",
    "updated_at": "2020-07-07T02:11:59Z",
    "deleted_at": null
}

Read

Retrieve a task.

Endpoint

Method URI Description
GET /tasks/{task_id} Retrieve a task by it's id

Example Response

{
    "id": 1,
    "key": "b62420f0-5a77-4895-bac5-1b4e3680d909",
    "name": "Follow Up",
    "description": null,
    "due_date": "2020-07-07",
    "due_time": "08:30:00",
    "owner_type": "users",
    "owner_id": 1,
    "subject_type": "contacts",
    "subject_id": 1,
    "assignee_type": "Owner",
    "assignee_id": 1,
    "assignee_email": "[email protected]",
    "assignee_first_name": "Gus",
    "assignee_last_name": "Grasshopper",
    "assignee_full_name": "Gus Grasshopper",
    "assignee": {
        "email": "[email protected]",
        "first_name": "Gus",
        "last_name": "Grasshopper",
        "full_name": "Gus Grasshopper"
    },
    "completed_at": null,
    "created_at": "2020-07-07T02:11:59Z",
    "updated_at": "2020-07-07T02:11:59Z",
    "deleted_at": null
}

Update

Update a task.

Endpoint

Method URI Description
PUT /tasks/{task_id} Update a task

Body Params

{
    "name": "Follow Up",
    "description": null,
    "due_date": "2020-07-07",
    "due_time": "08:30:00",
    "subject_type": "contacts",
    "subject_id": 1,
    "assignee_type": "Owner",
    "assignee_id": 1,
    "assignee_email": "[email protected]",
    "assignee_first_name": "Gus",
    "assignee_last_name": "Grasshopper"
}

Example Response

{
    "id": 1,
    "key": "b62420f0-5a77-4895-bac5-1b4e3680d909",
    "name": "Follow Up",
    "description": null,
    "due_date": "2020-07-07",
    "due_time": "08:30:00",
    "owner_type": "users",
    "owner_id": 1,
    "subject_type": "contacts",
    "subject_id": 1,
    "assignee_type": "Owner",
    "assignee_id": 1,
    "assignee_email": "[email protected]",
    "assignee_first_name": "Gus",
    "assignee_last_name": "Grasshopper",
    "assignee_full_name": "Gus Grasshopper",
    "assignee": {
        "email": "[email protected]",
        "first_name": "Gus",
        "last_name": "Grasshopper",
        "full_name": "Gus Grasshopper"
    },
    "completed_at": null,
    "created_at": "2020-07-07T02:11:59Z",
    "updated_at": "2020-07-07T02:11:59Z",
    "deleted_at": null
}

Delete

Delete a task.

Endpoint

Method URI Description
DELETE /tasks/{task_id} Delete a task by it's id

Example Response

{
    "success": true
}