Create a task

POST /api/v1/task

Headers

application/json

Body Required

Responses

  • 201 application/json
    Hide response attributes Show response attributes object
    • uuid string

      The UUID of the resource.

    • The timestamp of when the resource was created.

    • The timestamp of when the resource was updated.

    • name string

      The name of the task

    • The description of the task

    • priority string

      The priority of the task. Available Options: low, medium, high and highest

    • position integer

      The position of the task

    • due_at string

      The due date of the task

    • status object

      The status of the task. Can be any of the task statuses defined in the firm's settings

    • The type of the taskable. Available options: client, case, plan

    • taskable object

      The type of the taskable.

    • author object

      The account that created the task

    • The accounts that the task is assigned to

    • The date the task was completed

    • The account that completed the task

    • custom_fields array[object]

      Any custom fields on the model.

POST /api/v1/task
curl \
 -X POST https://api.plannrcrm.com/api/v1/task \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -H "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
 -d '{"name":"Check details","description":"Check details","priority":"low","due_at":"2020-01-01 00:00:00","taskable_type":"plan","taskable_uuid":"9ba57017-947c-4d90-bf1b-b5b0089914e1","task_status_uuid":"59ad107c-675f-490a-ac77-d3e787cb4a52","parent_task_uuid":"a76eca7d-d359-452a-b3f1-44e6dc83d308","assigned_to_uuids":["9e65cdb5-01e5-4b2f-9ffa-8547ad8f3241","2e850325-86b4-49cf-8c70-99c0ffedc158"],"custom_fields":[{"favourite_pet":"Dog"}]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "name": "Check details",
  "description": "Check details",
  "priority": "low",
  "due_at": "2020-01-01 00:00:00",
  "taskable_type": "plan",
  "taskable_uuid": "9ba57017-947c-4d90-bf1b-b5b0089914e1",
  "task_status_uuid": "59ad107c-675f-490a-ac77-d3e787cb4a52",
  "parent_task_uuid": "a76eca7d-d359-452a-b3f1-44e6dc83d308",
  "assigned_to_uuids": [
    "9e65cdb5-01e5-4b2f-9ffa-8547ad8f3241",
    "2e850325-86b4-49cf-8c70-99c0ffedc158"
  ],
  "custom_fields": [
    {
      "favourite_pet": "Dog"
    }
  ]
}
Response examples (201)
{
  "name": "Document the transaction",
  "uuid": "b570f681-29c3-4ea6-b589-9fa83099a416",
  "author": {
    "name": {
      "example": "Gareth Thompson",
      "collection": false,
      "description": "Name"
    },
    "role": {
      "example": "client",
      "collection": false,
      "description": "Account role"
    },
    "type": {
      "example": "client",
      "collection": false,
      "description": "Account type"
    },
    "uuid": {
      "example": "d0315756-c0e8-426c-b11e-2cff9946950c",
      "collection": false,
      "description": "The UUID of the resource."
    },
    "email": {
      "example": "gareth@codepotato.co.uk",
      "collection": false,
      "description": "Email"
    },
    "last_name": {
      "example": "Thompson",
      "collection": false,
      "description": "Last name"
    },
    "photo_url": {
      "example": "https://eu.ui-avatars.com/api/?name=Gareth+Thompson",
      "collection": false,
      "description": "The photo URL of the client"
    },
    "created_at": {
      "example": "2024-10-16T11:10:15+01:00",
      "collection": false,
      "description": "The timestamp of when the resource was created."
    },
    "first_name": {
      "example": "Gareth",
      "collection": false,
      "description": "First name"
    },
    "updated_at": {
      "example": "2024-10-16T11:10:15+01:00",
      "collection": false,
      "description": "The timestamp of when the resource was updated."
    },
    "external_references": {
      "example": "App\\Http\\Resources\\ExternalReferenceResource",
      "collection": true,
      "description": "The external references that have been added to the client."
    }
  },
  "due_at": "2021-01-01 00:00:00",
  "status": {
    "name": "Incomplete",
    "uuid": "23882ae4-4d2d-4616-8c52-334c274b743b",
    "colour": "#398898",
    "position": 1,
    "created_at": "2024-10-16T11:10:15+01:00",
    "updated_at": "2024-10-16T11:10:15+01:00",
    "is_archived": false,
    "is_not_started": false,
    "is_type_completed": false
  },
  "position": 1,
  "priority": "high",
  "taskable": {
    "name": "finance",
    "slug": "finance",
    "type": "App\\Http\\Resources\\CasesTypeResource",
    "uuid": "9073c7a1-62e1-45b6-92a2-a202585e45a2",
    "plans": "App\\Http\\Resources\\Plans\\PlanResource",
    "value": {
      "amount": {
        "example": "4000",
        "description": "Money amount at their lowest denominator (for example: pennies)"
      },
      "currency": {
        "example": "GBP",
        "description": "Currency of the money"
      },
      "formatted": {
        "example": "£40.00",
        "description": "Money amount formatted with currency"
      }
    },
    "status": "App\\Http\\Resources\\CasesStatusResource",
    "created_at": "2024-10-16T11:10:15+01:00",
    "updated_at": "2024-10-16T11:10:15+01:00",
    "completed_at": "2024-10-16T11:10:15+01:00",
    "participants": "App\\Http\\Resources\\AccountResource",
    "custom_fields": "App\\Http\\Resources\\CustomFieldValueResource",
    "status_position": 4,
    "task_board_uuid": "12d65f4d-4ec1-40d2-99f2-ffab52479d3e",
    "participants_count": 4
  },
  "created_at": "2024-10-16T11:10:15+01:00",
  "updated_at": "2024-10-16T11:10:15+01:00",
  "assigned_to": {
    "name": {
      "example": "Gareth Thompson",
      "collection": false,
      "description": "Name"
    },
    "role": {
      "example": "client",
      "collection": false,
      "description": "Account role"
    },
    "type": {
      "example": "client",
      "collection": false,
      "description": "Account type"
    },
    "uuid": {
      "example": "0992d42f-37b1-49b0-9bd2-4d9c94190ebc",
      "collection": false,
      "description": "The UUID of the resource."
    },
    "email": {
      "example": "gareth@codepotato.co.uk",
      "collection": false,
      "description": "Email"
    },
    "last_name": {
      "example": "Thompson",
      "collection": false,
      "description": "Last name"
    },
    "photo_url": {
      "example": "https://eu.ui-avatars.com/api/?name=Gareth+Thompson",
      "collection": false,
      "description": "The photo URL of the client"
    },
    "created_at": {
      "example": "2024-10-16T11:10:15+01:00",
      "collection": false,
      "description": "The timestamp of when the resource was created."
    },
    "first_name": {
      "example": "Gareth",
      "collection": false,
      "description": "First name"
    },
    "updated_at": {
      "example": "2024-10-16T11:10:15+01:00",
      "collection": false,
      "description": "The timestamp of when the resource was updated."
    },
    "external_references": {
      "example": "App\\Http\\Resources\\ExternalReferenceResource",
      "collection": true,
      "description": "The external references that have been added to the client."
    }
  },
  "description": "Document the transaction",
  "completed_at": "2021-01-01 00:00:00",
  "completed_by": {
    "name": {
      "example": "Gareth Thompson",
      "collection": false,
      "description": "Name"
    },
    "role": {
      "example": "client",
      "collection": false,
      "description": "Account role"
    },
    "type": {
      "example": "client",
      "collection": false,
      "description": "Account type"
    },
    "uuid": {
      "example": "4ffc96a6-ee30-42b7-9e1f-041143e58644",
      "collection": false,
      "description": "The UUID of the resource."
    },
    "email": {
      "example": "gareth@codepotato.co.uk",
      "collection": false,
      "description": "Email"
    },
    "last_name": {
      "example": "Thompson",
      "collection": false,
      "description": "Last name"
    },
    "photo_url": {
      "example": "https://eu.ui-avatars.com/api/?name=Gareth+Thompson",
      "collection": false,
      "description": "The photo URL of the client"
    },
    "created_at": {
      "example": "2024-10-16T11:10:15+01:00",
      "collection": false,
      "description": "The timestamp of when the resource was created."
    },
    "first_name": {
      "example": "Gareth",
      "collection": false,
      "description": "First name"
    },
    "updated_at": {
      "example": "2024-10-16T11:10:15+01:00",
      "collection": false,
      "description": "The timestamp of when the resource was updated."
    },
    "external_references": {
      "example": "App\\Http\\Resources\\ExternalReferenceResource",
      "collection": true,
      "description": "The external references that have been added to the client."
    }
  },
  "custom_fields": [
    {
      "name": "Favourite Drink",
      "type": "string",
      "uuid": "be3f5227-206f-4c1b-9dd2-0712379553ce",
      "value": "Coffee",
      "help_text": "This is the client's favourite drink.",
      "reference": "favourite_drink",
      "created_at": "2024-10-16T11:10:15+01:00",
      "updated_at": "2024-10-16T11:10:15+01:00",
      "is_required": false,
      "selection_options": [
        "Coffee",
        "Tea",
        "Water"
      ]
    }
  ],
  "taskable_type": "case"
}