**With the [Papo](https://papo.global/) REST API, you can build an endpoint on your website that receives the data from your signup form and calls the contacts API to create records in the CRM automatically, including custom attributes — eliminating manual data entry and speeding up lead onboarding.**

Instead of exporting spreadsheets or copying data between systems, this integration turns every new signup on your website into a contact in the Papo CRM in real time. The flow is simple: the form sends the data to a backend you control, that backend authenticates with the Papo API and creates the contact with name, email, phone and any custom fields your operation needs.

## Integration summary

| Component | What it does | Example |
| :--- | :--- | :--- |
| Website form | Collects the lead's name, email, phone and extra fields. | Capture page, landing page, checkout. |
| Intermediate endpoint | Receives the form data and calls the Papo API. | Script in Node.js, Python or automation in n8n/Zapier. |
| Papo contacts API | Creates the contact in the CRM with the submitted data. | Authenticated POST request with a secret key. |
| Custom attributes | Adds fields such as source, interest or score to the contact. | `custom_attributes` with `"origem": "site"`, `"plano_interesse": "gold"`. |

## How it works: step by step

1. **Generate the API keys in the Papo dashboard**  
   Go to the developer area of your Papo account and create a secret key. The account's public key is also visible on that screen. The secret key is shown only once; store it in a safe place and never expose it on the frontend.

2. **Create the form on your website**  
   Build the form with the fields you want to send to the CRM: name, email, phone and any additional data (interest, source, city, etc.). The form must make an HTTP request (POST) to the endpoint you will build in the next step.

3. **Build the intermediate endpoint**  
   On your server or in a serverless function (Node.js, Python, PHP, etc.), create a route that receives the form data. This code will be responsible for:
   - Validating the received fields.
   - Building the JSON payload for the Papo API.
   - Authenticating with the secret key (Bearer token) and, optionally, sending the public key in the `X-Papo-Public-Key` header.
   - Calling the Papo contact creation endpoint.

4. **Call the Papo contacts API**  
   Use the contact creation endpoint (see the official documentation at `https://papo.global/pt/docs` for the exact path and payload format). Send at least a name and email or phone. The API response will confirm the creation with the new contact's data.

5. **Add custom attributes**  
   If your account has custom attribute definitions (such as "source", "utm_source", "score"), you can send them in the same payload or in a complementary call. The API allows you to set/merge `custom_attributes` on the contact, eliminating the need to fill in these fields manually later.

6. **Handle the response and return to the user**  
   After successful creation, your endpoint can redirect the lead to a thank-you page or display a success message. In case of an error (invalid key, missing data), log it and return a friendly message.

Since the Papo API is REST and uses JSON, any language with HTTP support can be used. The official documentation provides examples in JavaScript, Python and curl, as well as details on authentication and error codes.

## Who this integration makes sense for

- **Websites and landing pages that capture leads** and want to eliminate manual data transfer to the CRM.
- **E-commerces and SaaS** that want to automatically create a contact at the moment of signup or purchase.
- **Agencies and consultancies** running lead generation campaigns that need leads to enter the CRM in real time for immediate follow-up.
- **White label resellers and integrators** who build custom flows for clients, connecting website forms to Papo without manual intervention.
- **Marketing and sales teams** that use custom attributes for segmentation and want those fields filled in automatically at the source.

## Frequently asked questions

### Do I need advanced programming knowledge to implement this integration?

Yes. You need to develop an endpoint on your server or use automation tools (n8n, Zapier) to bridge the form and the Papo API. The code itself is simple, but it requires basic knowledge of HTTP and JSON handling.

### Can I use any programming language?

Yes. The Papo API is REST and responds in JSON. Any language with HTTP request support (Python, Node.js, PHP, Ruby, etc.) can be used. The official documentation provides examples in JavaScript and Python.

### Is it possible to create custom attributes directly when creating the contact?

Yes. The Papo API allows you to set the contact's `custom_attributes` at creation time or update them later. See the documentation for the exact payload format and to check whether the attribute definitions already exist in the account.

### How do I keep the secret key secure?

The secret key must never be exposed on the frontend (public HTML/JavaScript). It should only live on the server, in environment variables. Use HTTPS for all communications and revoke the key immediately if there is any suspicion of a leak.

### What should I do if the API returns an error?

The Papo API returns standardized responses with `success: false` and an `error` object containing the code and message. Handle these errors in your code: validate that the required fields were sent, check that the key is active and that the payload format is correct. The documentation lists the main error codes.

### Can I use this integration with forms from platforms like WordPress, Typeform or RD Station?

Yes. You can set up webhooks on these platforms to send the form data to your intermediate endpoint, which will then call the Papo API. Another alternative is to use ready-made integrations via Zapier or n8n, creating a flow that receives the form event and triggers contact creation in Papo.

## Read also

- [How to use the Papo API to manage Companies in the CRM](/hc/papo/articles/how-to-use-papo-api-manage-companies-crm)
- [How to integrate Papo with Zapier using API and webhooks](/hc/papo/articles/how-to-integrate-papo-with-zapier-using-api-and-webhooks)

---

**[Start for free →](https://chat.papo.global/app/auth/signup?papo_lp=home&utm_source=lp&utm_medium=landing&utm_campaign=home&utm_content=start-free&papo_lp_v=start-free)**

Create your free Papo account and start integrating signup forms with the CRM in minutes, with no manual data entry.