OpenAPI Specification
openapi: 3.0.0
info:
description: REST API for accessing and managing your Nex data. Generate API keys from the Nex web UI and use them to authenticate requests.
title: Nex Developer AI Lists Tasks API
contact: {}
version: '1.0'
servers:
- url: https://app.nex.ai/api/developers
tags:
- name: Tasks
paths:
/v1/tasks:
post:
security:
- ApiKeyAuth: []
description: Creates a new task, optionally associated with records and assignees
tags:
- Tasks
summary: Create a task
operationId: createTask
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/developer.CreateTaskRequest'
description: Task to create
required: true
responses:
'200':
description: Created task
content:
application/json:
schema:
$ref: '#/components/schemas/developer.TaskResponse'
'400':
description: Bad request - Invalid data
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'401':
description: Unauthorized - Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
get:
security:
- ApiKeyAuth: []
description: Retrieves tasks with optional filtering by entity, assignee, completion status, and search query. Supports offset-based pagination.
tags:
- Tasks
summary: List tasks
operationId: listTasks
parameters:
- description: Filter by associated record ID
name: entity_id
in: query
schema:
type: string
- description: Filter by assignee user ID
name: assignee_id
in: query
schema:
type: string
- description: Search task titles
name: search
in: query
schema:
type: string
- description: Filter by completion status (true/false)
name: is_completed
in: query
schema:
type: boolean
- description: 'Max results (1-500, default: 100)'
name: limit
in: query
schema:
type: integer
- description: 'Pagination offset (default: 0)'
name: offset
in: query
schema:
type: integer
responses:
'200':
description: List of tasks
content:
application/json:
schema:
$ref: '#/components/schemas/developer.ListTasksResponse'
'400':
description: Bad request - Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'401':
description: Unauthorized - Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
/v1/tasks/{task_id}:
get:
security:
- ApiKeyAuth: []
description: Retrieves a single task by ID
tags:
- Tasks
summary: Get a task
operationId: getTask
parameters:
- description: Task ID
name: task_id
in: path
required: true
schema:
type: string
responses:
'200':
description: Task details
content:
application/json:
schema:
$ref: '#/components/schemas/developer.TaskResponse'
'400':
description: Bad request - Invalid task ID
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'401':
description: Unauthorized - Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
patch:
security:
- ApiKeyAuth: []
description: Updates properties of an existing task. All fields are optional — only provided fields are updated.
tags:
- Tasks
summary: Update a task
operationId: updateTask
parameters:
- description: Task ID
name: task_id
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/developer.UpdateTaskRequest'
description: Fields to update
required: true
responses:
'200':
description: Updated task
content:
application/json:
schema:
$ref: '#/components/schemas/developer.TaskResponse'
'400':
description: Bad request - Invalid data
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'401':
description: Unauthorized - Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
delete:
security:
- ApiKeyAuth: []
description: Archives (soft-deletes) a task. The task will have an archived_at timestamp set.
tags:
- Tasks
summary: Delete a task
operationId: deleteTask
parameters:
- description: Task ID
name: task_id
in: path
required: true
schema:
type: string
responses:
'200':
description: Task archived
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'401':
description: Unauthorized - Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/httpx.APIError'
components:
schemas:
developer.CreateTaskRequest:
type: object
required:
- title
properties:
title:
type: string
description: Task title (non-empty)
description:
type: string
description: Task description
priority:
type: string
description: Task priority
enum:
- unspecified
- low
- medium
- high
- urgent
due_date:
type: string
format: date-time
description: Due date (RFC3339)
entity_ids:
type: array
items:
type: string
description: Associated record IDs
assignee_ids:
type: array
items:
type: string
description: Assigned user IDs
example:
title: Follow up with client
description: Discuss contract renewal
priority: high
due_date: '2026-03-01T09:00:00Z'
entity_ids:
- '1001'
- '1002'
assignee_ids:
- '50'
httpx.APIError:
type: object
properties:
code:
type: integer
message:
type: string
developer.TaskResponse:
type: object
properties:
id:
type: string
title:
type: string
description:
type: string
priority:
type: string
due_date:
type: string
format: date-time
is_completed:
type: boolean
completed_at:
type: string
format: date-time
assignee_ids:
type: array
items:
type: string
entity_ids:
type: array
items:
type: string
created_by:
type: string
created_by_id:
type: string
created_at:
type: string
format: date-time
archived_at:
type: string
format: date-time
example:
id: '800'
title: Follow up with client
description: Discuss contract renewal
priority: high
due_date: '2026-03-01T09:00:00Z'
is_completed: false
assignee_ids:
- '50'
entity_ids:
- '1001'
- '1002'
created_by: developer_api
created_by_id: '42'
created_at: '2024-01-15T10:00:00Z'
developer.UpdateTaskRequest:
type: object
properties:
title:
type: string
description: New title (cannot be empty)
description:
type: string
description: New description (empty string clears it)
priority:
type: string
description: New priority (empty string clears it)
enum:
- unspecified
- low
- medium
- high
- urgent
- ''
due_date:
type: string
format: date-time
description: New due date
is_completed:
type: boolean
description: Mark complete/incomplete
entity_ids:
type: array
items:
type: string
description: Replace associated records
assignee_ids:
type: array
items:
type: string
description: Replace assignees
example:
title: Updated title
priority: urgent
is_completed: true
entity_ids:
- '1001'
assignee_ids:
- '50'
- '51'
developer.ListTasksResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/developer.TaskResponse'
has_more:
type: boolean
total:
type: integer
next_offset:
type: integer
example:
data:
- id: '800'
title: Follow up with client
priority: high
is_completed: false
created_by: developer_api
created_at: '2024-01-15T10:00:00Z'
has_more: true
total: 47
next_offset: 20
securitySchemes:
ApiKeyAuth:
description: 'API key for authentication (format: "Bearer YOUR_API_KEY")'
type: apiKey
name: Authorization
in: header