**To create and update deals in Kanban programmatically, use the [Papo](https://papo.global/) REST API. With secret key authentication (Bearer token) and the account's public key, you can send requests that create cards, move opportunities between stages, and mark results, integrating the sales pipeline with external systems without manual intervention.**

The Papo API exposes write operations for Kanban, allowing you to work with pipelines, stages, and CRM cards. This makes it possible to sync an ERP, a landing page, or a payment tool with the sales pipeline, keeping opportunities always up to date.

## Summary of the Kanban integration

| Step | Action | Important detail |
| :--- | :--- | :--- |
| 1. Get the keys | Generate the secret key (`sk_live_…`) and copy the public key (`pk_live_…`) in the Papo dashboard. | The secret key appears only once; store it in a safe place. |
| 2. Authenticate calls | Include the `Authorization: Bearer sk_live_…` header in all write requests. | The public key can be sent in the `X-Papo-Public-Key` header (optional). |
| 3. Know pipelines and stages | List the Kanban pipelines and their stages to get the required identifiers. | The API response returns the identifiers used in subsequent calls. |
| 4. Create or move cards | Send the operation to create a card in a stage, move a contact's card to another stage, or mark a result. | Each operation processes one action; for many records, automate sending in a loop. |
| 5. Validate the response | The API returns `success: true` and the card or listing data. | In case of error, the response body includes a code and message for correction. |

## What the API lets you do in Kanban

With the Kanban endpoints, you can programmatically:

- List available pipelines and their stages, with name and position.
- List CRM cards.
- List all won cards, for closed sales reports.
- Create a card in a stage, optionally linked to an existing contact.
- Move a contact's card to another stage of the pipeline.
- Mark cards as won or lost.
- Create a Kanban pipeline with default or custom stages.

These operations allow the pipeline to automatically reflect what happens outside Papo, such as a confirmed purchase, a scheduled meeting, or a signup coming from the website.

## How authentication and calls work

Every call that modifies data requires the account's **secret key**. It must be sent as a Bearer token in the `Authorization` header or, alternatively, in the `X-Papo-Secret-Key` header. The **public key** can accompany the request in the `X-Papo-Public-Key` header; its use is optional, but if sent, it must match the same account as the secret key.

The API base URL is `https://app.papo.global/api/v1`. From it, the Kanban endpoints accept the appropriate HTTP verbs to create, move, update, and list. Since the complete documentation details the paths, parameters, and accepted fields, we recommend consulting the [official API reference](https://papo.global/pt/docs) before coding.

To validate that your keys are working, you can call the `GET /api/v1/me` endpoint, which returns the account data. The authentication pattern is the same used in the other endpoints:

```
curl https://app.papo.global/api/v1/me \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Papo-Public-Key: pk_live_…"
```

The successful response includes `success: true` and the `data` object with the account information.

## Typical integration flow with external systems

A script in Python, Node.js, or automation in tools like n8n can execute the full pipeline cycle:

1. List pipelines and stages to get the identifiers for each column.
2. Create a card in the initial stage, linking to a contact if necessary.
3. Move the card to a new stage when an external event occurs — for example, payment confirmed or meeting scheduled.
4. Mark the card as won or lost when the opportunity is completed.
5. List won cards to feed reports, dashboards, or BI systems.

Since the API is REST and uses JSON, any language with HTTP support works. Payload details and fields for each operation are in the official documentation.

## Who this integration is for

- **Companies that capture opportunities in external systems**, such as landing pages, ERPs, or e-commerce, and want them to enter the Papo pipeline automatically.
- **Operations that need to move cards according to payment events**, such as gateways or billing platforms, without opening the CRM manually.
- **BI and data teams** that want to pull won cards and values into real-time dashboards.
- **IT teams building custom integrations** between Papo and internal tools, using the API as a bridge between the sales pipeline and the rest of the operation.

## Frequently asked questions

### Do I need to use the public key in all calls?
No. The public key is optional, but if sent in the `X-Papo-Public-Key` header, it must match the same account as the secret key.

### How do I know which stages exist in my pipeline?
List the Kanban pipelines via the API. The response returns the stages of each pipeline with their identifiers, used to create or move cards.

### Can I create a card already linked to a contact?
Yes. Card creation allows optionally linking to an existing contact, keeping the customer's history and data associated with the opportunity.

### Does the API allow updating a card's value?
The API exposes write operations for Kanban cards. The exact fields that can be updated, including values, are detailed in the official API documentation.

### Is it possible to mark a card as won or lost via the API?
Yes. The API allows marking cards as won and lost, in addition to listing all won cards for reports and dashboards.

### Do I need to program, or can I use automation tools?
You can use any language with HTTP support or automation tools like n8n, executing the calls in sequence according to the desired flow.

## Read also

- [How to use the Papo API to create and update contacts in bulk](/hc/papo/articles/how-to-use-papo-api-to-create-and-update-contacts-in-bulk)
- [How to receive real-time events from Papo via Webhook (outbound)](/hc/papo/articles/how-to-receive-real-time-events-from-papo-via-webhook-outbound)

---

**[Start free →](https://papo.global/?utm_source=helpcenter&utm_medium=article&utm_campaign=how-to-use-papo-api-create-update-deals-kanban&utm_content=en)**

The first user is free and does not require a credit card.