Skip to main content
POST
/
tasks
/
_raw
Create a new task
curl --request POST \
  --url https://api.gospott.com/tasks/_raw \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "content": "Follow up with candidate about interview availability",
  "dueDate": "2024-12-31T23:59:59.000Z",
  "assignedToUserId": "550e8400-e29b-41d4-a716-446655440000",
  "links": [
    {
      "taskLinkId": null,
      "entityType": "candidate",
      "entityId": "550e8400-e29b-41d4-a716-446655440000"
    }
  ]
}
'
{
  "id": "<string>",
  "content": "<string>",
  "dueDate": "2023-11-07T05:31:56Z",
  "isCompleted": true,
  "completedAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "createdBy": {
    "id": "<string>",
    "name": "<string>",
    "avatarUrl": "<string>",
    "deactivatedAt": "2023-11-07T05:31:56Z"
  },
  "assignedTo": {
    "id": "<string>",
    "name": "<string>",
    "avatarUrl": "<string>",
    "deactivatedAt": "2023-11-07T05:31:56Z"
  },
  "links": {
    "candidates": [
      {
        "taskLinkId": "<string>",
        "isMention": true,
        "id": "<string>",
        "firstName": "<string>",
        "lastName": "<string>",
        "middleName": "<string>",
        "secondLastName": "<string>",
        "avatarUrl": "<string>"
      }
    ],
    "vacancies": [
      {
        "taskLinkId": "<string>",
        "isMention": true,
        "id": "<string>",
        "name": "<string>",
        "companyId": "<string>",
        "companyName": "<string>",
        "companyLogoUrl": "<string>"
      }
    ],
    "clients": [
      {
        "taskLinkId": "<string>",
        "isMention": true,
        "id": "<string>",
        "name": "<string>",
        "logoUrl": "<string>"
      }
    ],
    "users": [
      {
        "taskLinkId": "<string>",
        "isMention": true,
        "id": "<string>",
        "name": "<string>",
        "avatarUrl": "<string>",
        "deactivatedAt": "2023-11-07T05:31:56Z"
      }
    ],
    "teams": [
      {
        "taskLinkId": "<string>",
        "isMention": true,
        "id": "<string>",
        "name": "<string>",
        "avatarUrl": "<string>"
      }
    ],
    "clientContacts": [
      {
        "taskLinkId": "<string>",
        "isMention": true,
        "id": "<string>",
        "firstName": "<string>",
        "lastName": "<string>",
        "middleName": "<string>",
        "secondLastName": "<string>",
        "avatarUrl": "<string>",
        "candidateId": "<string>",
        "companyId": "<string>",
        "companyName": "<string>",
        "companyLogoUrl": "<string>"
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get your API key from Settings → API Keys in your Spott dashboard.

Body

application/json
content
string
required

The content/description of the task.

Example:

"Follow up with candidate about interview availability"

dueDate
string<date-time> | null
required

The due date for the task, or null if no due date

Example:

"2024-12-31T23:59:59.000Z"

assignedToUserId
string | null
required

The user ID to assign the task to, or null for unassigned tasks

Example:

"550e8400-e29b-41d4-a716-446655440000"

Links to related entities (candidates, vacancies, clients, etc.)

Response

Task created successfully

id
string
required

Unique identifier for the task.

content
string
required

The task description. May contain @mentions that automatically create entity links.

dueDate
string<date-time> | null
required

The deadline for the task, or null if no due date is set.

isCompleted
boolean
required

Whether the task has been marked as completed.

completedAt
string<date-time> | null
required

Timestamp when the task was marked as completed, or null if not yet completed.

createdAt
string<date-time>
required

Timestamp when the task was created.

createdBy
object
required

The user who created the task.

assignedTo
object
required

The user assigned to complete the task, or null if unassigned.

All entities linked to this task, grouped by entity type. Links can be created explicitly or via @mentions in the task content.