Skip to main content

Activities (todos)

An activity is a task linked to a deal: a call, a meeting, a follow-up.

Valid types

The type values are literal Portuguese strings sent to and returned by the API, accents included. Send Ligação, Reunião, Follow-up or Tarefa exactly as written — the English column above is only a gloss for readers, never a value to send. Any type outside this list returns 400.

The Activity object

string
Activity UUID
string
Deal UUID
string
Activity type
string
Activity description
string
Due date (ISO 8601), or absent
string
UUID of the booking in the Bookings module, when the activity came from a scheduled meeting
boolean
Whether the activity is completed
boolean
Calculated at read time: true when the activity is pending and due_at has already passed

List activities

GET /backend/pipeline/deals/{id}/todos
Requires pipeline.view.

Create an activity

POST /backend/pipeline/deals/{id}/todos
Requires pipeline.deals.edit.
string
Activity description. When omitted or empty, the type itself is used as the description.
string
default:"Tarefa"
One of the valid types above
string
Due date (ISO 8601)
string
UUID of a booking already created in Bookings, to link the activity to the real meeting

Update an activity

PUT /backend/pipeline/todos/{id}
Requires pipeline.deals.edit. Omitted fields stay unchanged.
string
New description. If sent, it cannot be empty — in that case the response is 400.
boolean
Marks or unmarks it as completed
string
New due date (ISO 8601)
An activity’s type cannot be changed after it is created.

Delete an activity

DELETE /backend/pipeline/todos/{id}
Requires pipeline.deals.edit. Returns { "success": true }.

Files

Attachments follow the two-phase pattern already used across the rest of the platform: first the file is sent to File Upload, then the resulting upload_id is linked to the deal.
1

Send the file

POST /backend/uploads with the file. The upload is born with status PENDING.
2

Link it to the deal

POST /backend/pipeline/deals/{id}/files with the upload_id. The upload becomes ASSOCIATED.

List files

GET /backend/pipeline/deals/{id}/files
Requires pipeline.view.

Attach a file

POST /backend/pipeline/deals/{id}/files
Requires pipeline.deals.edit.
string
required
UUID of the upload returned by the previous step
Returns 201 Created with the file.

Remove a file

DELETE /backend/pipeline/deal-files/{id}
Requires pipeline.deals.edit. The {id} is the attachment id (DealFile), not the upload_id.

History (events)

Each deal keeps a persisted event log — it is not derived at read time. This is what feeds the deal’s history tab.
GET /backend/pipeline/deals/{id}/events
Requires pipeline.view. Paginated response.

Query Parameters

integer
default:"1"
Desired page
integer
default:"50"
Items per page. Values outside 1–200 fall back to the default of 50.

Event types

Event author (actor_type)

The title and description of an event are generated by the server in Portuguese and stored as-is. Use event_type and metadata if you need to render your own English labels.