API Overview
The Attri REST API lets you manage your workspace programmatically. Create links, manage tags, query analytics, and integrate Attri into your existing tools and workflows.
Base URL
Section titled “Base URL”https://api.attri.io/v1Authentication
Section titled “Authentication”All API requests require a Bearer token. Generate an API key under Settings > API Keys in the app.
curl -H "Authorization: Bearer YOUR_API_KEY" \ https://api.attri.io/v1/linksAPI keys are scoped to a workspace. Each key has full access to the workspace’s resources, so treat them like passwords.
Rate limits
Section titled “Rate limits”Rate limits vary by plan:
| Plan | Requests per minute |
|---|---|
| Pro | 30 |
| Business | 60 |
| Scale | 120 |
| Enterprise | 300 |
When you exceed the rate limit, the API returns 429 Too Many Requests with a Retry-After header. Respect that header.
Available endpoints
Section titled “Available endpoints”GET /v1/links— List all linksPOST /v1/links— Create a linkGET /v1/links/:id— Get a linkPATCH /v1/links/:id— Update a linkDELETE /v1/links/:id— Delete a link
GET /v1/tags— List all tagsPOST /v1/tags— Create a tagPATCH /v1/tags/:id— Update a tagDELETE /v1/tags/:id— Delete a tag
Analytics
Section titled “Analytics”GET /v1/analytics/clicks— Click analytics with filters
Response format
Section titled “Response format”All responses are JSON. We’ve kept the structure flat and predictable (no deeply nested objects to dig through).
{ "data": { "id": 1, "slug": "spring-sale", "destinationUrl": "https://example.com/sale" }}Errors return an error field:
{ "error": "Link not found"}Full reference
Section titled “Full reference”For complete endpoint documentation with request/response schemas, visit the API Reference.
- API access requires a Pro plan or higher
- The Free plan doesn’t include API access
- API keys can be revoked at any time under Settings