Public API: getting started
The public API connects your systems to Grupos Inteligentes. You can retrieve data and automate tasks without repeating actions in the dashboard.
Before you begin
Section titled “Before you begin”You will need:
- access to your Grupos Inteligentes account;
- an active Scale subscription;
- a secure place to store the token;
- a tool that can make HTTPS requests.
An API token works like a unique password for an integration. It lets another system access your account data.
Create a token
Section titled “Create a token”- Sign in to the Grupos Inteligentes app.
- Open Settings in the side menu.
- Select API access.
- Click Create token.
- Enter a name that identifies the integration.
- Confirm by clicking Create.
- Copy the token and store it immediately.
Use a clear name, such as Report automation or CRM integration.
Tip: Store the token in a password or secrets manager. Never place it on a public page, in a browser app, or in a shared file.
Make your first request
Section titled “Make your first request”The API base address is:
https://api.gruposinteligentes.com/apiSend the token in the Authorization header, preceded by the word Bearer.
curl --request GET \ --url https://api.gruposinteligentes.com/api/v1/redirectors \ --header "Accept: application/json" \ --header "Authorization: Bearer $GI_API_TOKEN"In this example, GI_API_TOKEN is a secure variable in your system. Do not replace it with a real token in shared code.
For requests that send data, also add this header:
Content-Type: application/jsonFind the right operation
Section titled “Find the right operation”Open the complete API reference to see:
- available addresses;
- fields accepted by each request;
- response examples;
- possible error codes.
The reference shows examples with the Authorization header. For safety, run these examples in your own tool.
Look up a redirector’s groups
Section titled “Look up a redirector’s groups”The API registers groups that already exist in WhatsApp. It does not create new groups in WhatsApp. After a group is registered, the whatsapp_url field cannot be changed.
- List groups:
GET /api/v1/redirectors/{redirector}/groups - View a group:
GET /api/v1/redirectors/{redirector}/groups/{group}
In the list, you can use these parameters:
| Parameter | What it does |
|---|---|
limit | Number of items per page. The default is 15, and the maximum is 100. |
filter[name] | Finds groups by name. |
filter[whatsapp_url] | Finds groups by invite link. |
filter[filled_slots] | Shows groups with exactly this number of filled slots. |
filter[empty] | Shows published groups that still have slots. |
sort | Sorts by id, created_at, name, filled_slots, last_track_at, or occupancy. Add - before the field for descending order. |
Tip: To find groups with slots, use
filter[empty]=1&sort=occupancy.
Automate preserved links
Section titled “Automate preserved links”The API also lets you preserve a public link when deleting a redirector. A virtual slug is the term used in the API reference for this preserved link.
- When deleting the original redirector, send
merge_into_redirector_idwith the destination identifier andconfirm_merge: true. - You can list and view the preserved links in your account.
- You can restore the original redirector or schedule deletion of the preserved link.
- Preserved links cannot be created or edited directly. They are created only after a confirmed merge.
The original redirector remains recoverable for 30 days. See each operation’s fields and responses in the API reference.
Limits and validity
Section titled “Limits and validity”- Each token accepts up to 60 requests per minute.
- The token remains active until you revoke it.
- Revoked tokens stop working immediately.
- Integration tokens cannot create, list, or revoke other tokens.
To replace a token, create another one and update your integration. Then revoke the old token.
Revoke a token
Section titled “Revoke a token”Revoke a token that is lost, exposed, or no longer used:
- Open Settings in the app.
- Select API access.
- Find the token by its name.
- Click Revoke and confirm.
The integration loses access to your account as soon as you confirm.
Common errors
Section titled “Common errors”| Code | What it means | How to fix it |
|---|---|---|
401 | The token is invalid or revoked | Create a token and update the integration |
403 | Your current plan does not allow tokens | Activate or renew the Scale plan |
404 | The item does not exist, does not belong to your account, or the identifier has an invalid format | Check the identifiers used in the address |
422 | A field is missing or incorrect | Check the fields in the API reference |
429 | Too many requests in a short time | Wait and reduce the request frequency |
503 | Redirector creation is unavailable right now | Wait the number of seconds in the Retry-After header and try again |
If you still need help, email suporte@gruposinteligentes.com.