> ## Documentation Index
> Fetch the complete documentation index at: https://docs.penbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Drive the Case

> Move a case through its statuses, assign follow-up tasks, and hand your client the switch that revokes your access.

A case that never moves is a form. This guide is what turns it into a lifecycle your client's team
actually works on — and it ends with the switch that makes the whole arrangement safe for them.

## What you'll have

By the end of this guide:

* The case moving through the statuses its template defines
* Follow-up tasks assigned to your client's team, next to the ones Penbox creates itself
* Your client able to cut your integration off in one click, and you able to explain how

**Estimated time:** 10 minutes

<Info>
  Finish [Create a Case on the Fly](/guides/headless-create-case) first. You need a case id.
</Info>

***

<Steps>
  <Step title="Move the case through its lifecycle">
    Send a `status` with [Update Case](/api-reference/cases/archive-case):

    ```bash theme={null}
    curl --request POST \
      --url https://connect.penbox.io/v1/cases/{id} \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{ "status": "in_progress" }'
    ```

    <Warning>
      Read the keys the case accepts from its own `statuses` array, returned by
      [Get Case](/api-reference/cases/get-case). Each template defines its own — never hardcode a
      custom status in your app.
    </Warning>

    The change lands in the case history, attributed to your integration by name. Your client can
    see what your app did and when.
  </Step>

  <Step title="Assign follow-up tasks">
    Put your own follow-ups next to the ones Penbox creates, assigned to the members you registered
    in guide 1:

    ```bash theme={null}
    curl --request POST \
      --url https://connect.penbox.io/v1/cases/{id}/tasks \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{
        "title": "Call the client back",
        "due_at": "2026-09-15T09:00:00Z",
        "assignee": { "email": "amina@acme.example" }
      }'
    ```

    The assignee is resolved by email against the workspace members — silent ones included. Omit
    `assignee`, or send `null`, to leave the task for whoever picks it up. See
    [List Case Tasks](/api-reference/tasks/list-case-tasks),
    [Create Case Task](/api-reference/tasks/create-case-task) and
    [Update Case Task](/api-reference/tasks/update-case-task).
  </Step>

  <Step title="Show your client the way out">
    The workspace owner can cut your integration off at any time, from
    **Settings → Integrations → Disconnect**. One click revokes your token immediately and removes
    your support account from the workspace. Everything you created stays; only your access dies.

    Tell your clients this exists. It is the reason they can hand you their case management in the
    first place.
  </Step>
</Steps>

## You've integrated Penbox

The three guides are done. Your product can now:

* Onboard a client with no manual step on either side
* Open a case from inside your own screens
* Fill it with data and documents
* Move it through its lifecycle and put follow-ups on the right people
* Be switched off by your client in one click

That is the complete headless loop. Penbox is your case engine, and your users never see it.

## Going further

Read [Statuses and Lifecycle](/cases/statuses_lifecycle) for how templates define their own
transitions, and [Automations](/cases/automations) for the work Penbox does on the case without you
asking.
