API Reference / Actions

PUT /actions/{action_id}/swap

Specify action to be swapped in as the logged API users next action

Resolves a date conflict between a next action and a dated queued action by swapping them. The swap needs a next action of status date, date_time or waiting, and a queued action of status queued_with_date. Both actions must belong to the current user, and the queued action's date must be before the next action's date.

Path parameters

Name Type Description
action_id req string Action ID

Responses

200 OK
  • statusintegerint32

    Response code

  • messagestring

    Response message

  • timestampintegerunix-timestamp

    Response time

  • dataobject
    object fields →
    • actionobject

      Completable tasks related to Contacts. ASAP first, then dated actions ordered by due date (overdue first), followed by waiting for (blocked) and finally queued actions (without any date).

      object fields →
      • idstringbson-id

        ID of the action

      • assignee_idstringbson-idrequired

        ID of the user, to whom the action is assigned. Defaults to the logged API user's ID.

      • contact_idstringbson-idrequired

        ID of the contact, with whom the action is associated

      • textstringrequired

        The main text/description of the action

      • statusstring

        Status of the action

        enum: asap · date · date_time · waiting · queued · queued_with_date · done

      • datestringdate

        Due date for the action (status must be one of `date`, `date_time` or `queued_with_date`). Defaults to today's date.

      • exact_timeintegerunix-timestamp

        The UNIX Epoch time in seconds the action is due (status must be `date_time`)

      • positionintegerint32

        The position of the action (in the list of queued actions)

      • doneboolean

        Has the action been marked as complete?

      • done_atstringdate

        The date the action was completed (only returned, if action complete)

      • created_atstringdate-time

        Creation time of the action

      • modified_atstringdate-time

        Last modification time of the action

Standard error responses: 400 · 401 · 403 · 404 · 409 · 500 — shared across the API. See Errors.

Related guides