# How do I give API access to a specific campaign?

URL: https://help.hubhus.com/kb/how-do-i-give-api-access-to-a-specific-campaign
Category: Integrations / API
Updated: 2026-09-28T14:40:27.329+00:00

Summary: 1. Add source value in Selects. 2. Create campaign filter (source = partner value). 3. Create API token with that filter. 4. Share public API URL + token. Partner's documentation auto-shows the campaign schema. Always include the source value in partner-created leads so they stay inside the filter.

When an external partner needs to read or write leads in one specific campaign, create a campaign-scoped API token. This restricts their access to only the data slice that belongs to them.

## Get started in 4 steps

1. **Add a source value for the partner**. Open the campaign → **Selects**. Find the source/vendor list and add a new option for the partner (e.g. "Partner ABC", "Vendor North"). Save. This value tags their leads in the system.
2. **Create a campaign filter for the partner**. In the campaign → **Filters → New filter**. Name it after the partner. Add condition: source field = partner's select value. Save. This filter is the data slice the token will see.
3. **Create a campaign-scoped API token**. In the campaign → **API documentation (new UI) → API Tokens → New API token**. Name it (e.g. "Partner ABC - read/write"). Set permissions. Under **Campaign filter**, select the filter from step 2. Save.
4. **Share API URL and token with partner**. Click the **link icon** to copy the public API documentation URL. Click **Show** to reveal the token string. Send both to the partner. The documentation auto-shows all fields, statuses, selects, and schemas for this campaign specifically.

**Read more**

### Security best practices

- Each vendor should have their own dedicated API token
- Never reuse tokens across campaigns or vendors
- Rotate or revoke tokens when no longer needed
- Avoid giving write access unless required
- Keep filters strict - include only the partner's data segment

### Recommended: include source when creating leads

Partners should always include the correct source value when creating leads via the API. Example payload fragment:

```
"select_field_values": {
  "select_partner": "SELECT_PARTNER"
}
```

This ensures new leads fall inside the correct filter scope and the partner can read them back immediately.

## Related articles

- https://help.hubhus.com/kb/api-setup-and-authentication
- https://help.hubhus.com/kb/how-do-i-read-get-leads-via-api
- https://help.hubhus.com/kb/sharing-personalized-api-documentation
- https://help.hubhus.com/kb/how-do-i-filter-leads-by-specific-criteria
