> This page is part of EVVA for Developers (https://developers.evvahub.com), the documentation of the EVVA Partner API. The API is in developer preview and the SDK packages are not yet published: do not suggest installing them. Index: https://developers.evvahub.com/llms.txt

# EVVA for Developers

The Partner API lets an agency's **integration application** act for the creators linked to the agency: answer
fans, run broadcasts, manage the media vault and posts, follow orders and receive every event as it happens — always
within the scopes the agency granted and the creator agreed to.

Start building

API reference

Webhooks

## Start here

#### [Quickstart](/quickstart)

From a new application in the Partner Hub to your first API call.

#### [Authentication](/authentication/overview)

Credentials, short-lived tokens and what each grant allows.

#### [Sandbox](/sandbox)

Synthetic creators and fans to build against before you go live.

#### [API reference](/api-reference/overview)

Every operation an application can call, with schemas.

## Receive events

#### [Webhooks](/webhooks/overview)

Signed HTTPS deliveries, retried for 24 hours and replayable.

#### [Event feed](/event-feed)

The durable, ordered record, with consumer groups for several workers.

#### [Realtime](/realtime)

Every event over one WebSocket, resumable by cursor.

## Your first request

Exchange your application's credentials for a short-lived token, then ask the API who you are. Plain HTTP in every
language — the [SDKs](/sdks/overview) wrap the same two calls.

**`cURL`**

```bash title="cURL"
# 1. A 15-minute access token for your application (client_secret_basic)
TOKEN=$(curl -sS https://api.evvahub.com/partner/v1/oauth/token \
  -u "$EVVA_CLIENT_ID:$EVVA_CLIENT_SECRET" \
  -d grant_type=client_credentials | jq -r .access_token)

# 2. Who am I, and what may I do?
curl -sS https://api.evvahub.com/partner/v1/app/me \
  -H "Authorization: Bearer $TOKEN"
```

**`TypeScript`**

```typescript title="TypeScript"
const basic = Buffer.from(`${process.env.EVVA_CLIENT_ID}:${process.env.EVVA_CLIENT_SECRET}`).toString('base64');

// 1. A 15-minute access token for your application (client_secret_basic)
const tokenResponse = await fetch('https://api.evvahub.com/partner/v1/oauth/token', {
  method: 'POST',
  headers: { Authorization: `Basic ${basic}` },
  body: new URLSearchParams({ grant_type: 'client_credentials' }),
});
const { access_token } = await tokenResponse.json();

// 2. Who am I, and what may I do?
const me = await fetch('https://api.evvahub.com/partner/v1/app/me', {
  headers: { Authorization: `Bearer ${access_token}` },
}).then((response) => response.json());
console.log(me.application.name, me.environment, me.scopes);
```

**`Python`**

```python title="Python"
import os
import requests

# 1. A 15-minute access token for your application (client_secret_basic)
token = requests.post(
    "https://api.evvahub.com/partner/v1/oauth/token",
    auth=(os.environ["EVVA_CLIENT_ID"], os.environ["EVVA_CLIENT_SECRET"]),
    data={"grant_type": "client_credentials"},
    timeout=10,
).json()["access_token"]

# 2. Who am I, and what may I do?
me = requests.get(
    "https://api.evvahub.com/partner/v1/app/me",
    headers={"Authorization": f"Bearer {token}"},
    timeout=10,
).json()
print(me["application"]["name"], me["environment"], me["scopes"])
```

**`Go`**

```go title="Go"
// 1. A 15-minute access token for your application (client_secret_basic)
form := url.Values{"grant_type": {"client_credentials"}}
req, _ := http.NewRequest(http.MethodPost, "https://api.evvahub.com/partner/v1/oauth/token", strings.NewReader(form.Encode()))
req.SetBasicAuth(os.Getenv("EVVA_CLIENT_ID"), os.Getenv("EVVA_CLIENT_SECRET"))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
res, err := http.DefaultClient.Do(req)
if err != nil {
	log.Fatal(err)
}
var token struct {
	AccessToken string `json:"access_token"`
}
json.NewDecoder(res.Body).Decode(&token)
res.Body.Close()

// 2. Who am I, and what may I do?
req, _ = http.NewRequest(http.MethodGet, "https://api.evvahub.com/partner/v1/app/me", nil)
req.Header.Set("Authorization", "Bearer "+token.AccessToken)
res, err = http.DefaultClient.Do(req)
if err != nil {
	log.Fatal(err)
}
defer res.Body.Close()
io.Copy(os.Stdout, res.Body)
```

**`PHP`**

```php title="PHP"
<?php
// 1. A 15-minute access token for your application (client_secret_basic)
$ch = curl_init('https://api.evvahub.com/partner/v1/oauth/token');
curl_setopt_array($ch, [
    CURLOPT_USERPWD => getenv('EVVA_CLIENT_ID') . ':' . getenv('EVVA_CLIENT_SECRET'),
    CURLOPT_POSTFIELDS => http_build_query(['grant_type' => 'client_credentials']),
    CURLOPT_RETURNTRANSFER => true,
]);
$token = json_decode(curl_exec($ch), true)['access_token'];

// 2. Who am I, and what may I do?
$ch = curl_init('https://api.evvahub.com/partner/v1/app/me');
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
    CURLOPT_RETURNTRANSFER => true,
]);
$me = json_decode(curl_exec($ch), true);
echo $me['application']['name'], ' ', $me['environment'], PHP_EOL;
```

The [Quickstart](/quickstart) walks through creating the application, its credentials and its grants first.

## How it fits together

```mermaid
sequenceDiagram
    autonumber
    participant C as Creator
    participant H as Agency (Partner Hub)
    participant A as Your application
    participant T as Token endpoint
    participant P as Partner API
    C->>H: Consents when linking to the agency
    H->>A: Application, credentials and grants
    A->>T: Client credentials
    T-->>A: Short-lived access token
    A->>P: REST calls for granted creators
    P-->>A: Events: feed, realtime, webhooks
    P-->>H: Sensitive actions wait for approval
```

1. Each **creator** consents to an agency when linking to it; nothing granted later can exceed that consent.
2. The **agency** creates an application in the [Partner Hub](https://partner.evvahub.com), receives its credentials,
   and grants it creators and scopes.
3. Your **application** exchanges its credentials for a token…
4. …a short-lived, opaque access token.
5. It calls the **Partner API** for the creators it is granted. Every request is checked against the grant, the
   consent and the token's scopes.
6. **Events** reach it through the feed, realtime or webhooks — the same envelope on all three.
7. **Sensitive actions** — deletes, prices and other financial commitments — run within the agency's automatic
   limits, or after a person in the agency approves them.

## Go deeper

#### [Approvals and limits](/approvals)

Sensitive actions within the agency's limits or with a person's approval.

#### [Conversation leases](/conversation-leases)

Automate replies without talking over people.

#### [Buyer pseudonyms](/buyer-pseudonyms)

Recognise a returning fan without learning who they are.

#### [Scopes and grants](/authentication/scopes)

What an application can be granted, and what is off by default.

#### [Errors](/conventions/errors)

Every code and what to do about it.

#### [SDKs](/sdks/overview)

TypeScript, Python, Go and PHP — at general availability.

## At a glance

| Topic             | Detail                                                                           |
| ----------------- | -------------------------------------------------------------------------------- |
| Base URL          | `https://api.evvahub.com`, paths under `/partner/v1`                             |
| Authentication    | OAuth 2.0 client credentials — client secret or `private_key_jwt`                |
| Format            | JSON; every error is `{code, error, details?, requestId}`                        |
| Events            | Feed (7-day retention), realtime (WebSocket), webhooks (Standard Webhooks)       |
| Versioning        | Additive changes within v1; at least 180 days' notice before anything is removed |
| OpenAPI           | [`openapi.yaml`](/openapi.yaml) · [`openapi.json`](/openapi.json)                |
| For AI assistants | [`llms.txt`](/llms.txt) · [`llms-full.txt`](/llms-full.txt)                      |

> **Note**
>
> The Partner API is in developer preview: it is not yet open to applications, and the SDK packages are not yet
> published. These pages describe it as it will be at general availability.

## Get help

#### [Help centre](https://help.evvahub.com/welcome)

How the product works for agencies and creators.

#### [Security](/security)

Report a vulnerability to [security@evvahub.com](mailto:security@evvahub.com).

#### [Policies](https://legal.evvahub.com/overview)

Terms, privacy and the agency agreements.

Questions about your agency's account: [support@evvahub.com](mailto:support@evvahub.com).