> 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

# Create a marketing link

POST https://api.evvahub.com/partner/v1/accounts/{creatorId}/links
Content-Type: application/json

Creates a tracked marketing link for the creator, through the same authoring the creator uses.

EVVA generates the link's URL, context and traffic capability, so no request field can forge attribution. `outcomes.revenue` is null unless the creator's consent covers `read:revenue`.

**Idempotency**

The `Idempotency-Key` header is required. The first request returns `201`; a retry with the same key returns `200` with the link the first request created. See [idempotency](/conventions/idempotency).

**Errors**

- `409 IDEMPOTENCY_KEY_CONFLICT` — the key was already used for a different link.
- `409 IDEMPOTENT_REQUEST_IN_FLIGHT` — the first request with this key is still running.
- `422 CAMPAIGN_UNAVAILABLE` — the campaign cannot take the link.

**Required scopes:** `write:links`.

Reference: https://developers.evvahub.com/api-reference/links/create-marketing-link

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Request an access token at `POST /partner/v1/oauth/token` (`grant_type=client_credentials`) with the application's client secret or a `private_key_jwt` assertion, then send it as `Authorization: Bearer evpa_live_…` (or `evpa_test_…` for a sandbox application). Tokens are opaque and short lived (see `expires_in`); there is no refresh token. Each operation lists the scopes it requires.

## Request

### Path parameters

- `creatorId` (string, required) — The creator profile id — the ONLY source of the creator a request acts for.

### Headers

- `X-Creator-Id` (string, optional) — Optional echo of the path `creatorId`; any other value is refused with 403 CREATOR_CONTEXT_MISMATCH.
- `Idempotency-Key` (string, required) — Required when creating a marketing link; missing or blank is `400 IDEMPOTENCY_KEY_REQUIRED`. A retry with the same key answers `200` with the link the first request created. The same key for a different link is `409 IDEMPOTENCY_KEY_CONFLICT`, and while the first request is still running it is `409 IDEMPOTENT_REQUEST_IN_FLIGHT`.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required)
- `destination` (string, required) — An absolute http(s) URL.
- `declaredChannel` (enum, optional)
  - Allowed values: `social`, `email`, `messaging`, `search`, `display`, `video`, `affiliate`, `offline`, `other`
- `campaignRef` (string, optional, nullable)
- `utm` (PartnerV1AccountsCreatorIdLinksPostRequestBodyContentApplicationJsonSchemaUtm, optional)
- `creativeName` (string, optional, nullable)

## Response

### 201

Authored (a replay answers 200).

- `link` (MarketingLink, required) — One of the creator's marketing links. `traffic` and `outcomes` cover the 30 days before your request. Each is `null` when EVVA cannot report it, which never means "no traffic": a link nobody used reports zeroes.

## Errors

### 400 Bad Request Error

Invalid or missing parameters: `INVALID_REQUEST` (`details` names the fields), or a more specific code of the operation.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 401 Unauthorized Error

Token missing, malformed, expired or revoked: `INVALID_TOKEN` (or `UNAUTHORIZED` when no bearer token was sent). Request a new token and retry.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 403 Forbidden Error

Not your creator, or not with this token: `GRANT_REVOKED` (no active link to the creator), `NOT_ASSIGNED`, `OAUTH_SCOPE_MISSING` (the creator has not consented to the scope), `INSUFFICIENT_SCOPE` (the token lacks it), `CREATOR_CONTEXT_MISMATCH`, `AGENCY_SUSPENDED`.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 409 Conflict Error

Conflicts with the current state: `IDEMPOTENCY_KEY_REUSED` (the key was used for a different request), an approval that is still pending or already used, or a more specific code of the operation.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 422 Unprocessable Entity Error

The campaign named by `campaignRef` is not available to this creator (`CAMPAIGN_UNAVAILABLE`).

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 429 Too Many Requests Error

Rate limited: `RATE_LIMIT_EXCEEDED`. Wait `Retry-After` seconds before retrying.

- `code` (enum, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
  - Allowed values: `RATE_LIMIT_EXCEEDED`, `TOO_MANY_MESSAGES`
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (RateLimitErrorDetails, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 500 Internal Server Error

Unexpected server error: `INTERNAL_ERROR`. Nothing internal is disclosed; quote the `X-Request-Id` when you report it.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 503 Service Unavailable Error

Temporarily unavailable: `SERVICE_UNAVAILABLE`, `TEMPORARILY_UNAVAILABLE`, `MEDIA_STORAGE_UNAVAILABLE` or `CREATOR_STANDING_UNAVAILABLE`. Retry after `Retry-After` seconds.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

## Types

### PartnerV1AccountsCreatorIdLinksPostRequestBodyContentApplicationJsonSchemaUtm

- `source` (string, optional, nullable)
- `medium` (string, optional, nullable)
- `campaign` (string, optional, nullable)
- `content` (string, optional, nullable)
- `term` (string, optional, nullable)

### MarketingLink

One of the creator's marketing links. `traffic` and `outcomes` cover the 30 days before your request. Each is `null` when EVVA cannot report it, which never means "no traffic": a link nobody used reports zeroes.

- `ref` (string, required) — The link's reference: `{ref}` in the link's own path. The last link's `ref` on a full page is the page's `nextBefore`.
- `principal` (string, required) — The creator the link belongs to, as the `creatorId`.
- `name` (string, required) — The link's name, 1 to 120 characters.
- `destination` (string, required) — Where the link sends visitors.
- `state` (enum, required) — `draft` until the tracked link exists; `active` while it sends visitors on; `paused` while it is stopped and sends nobody on; `archived` for good.
  - Allowed values: `draft`, `active`, `paused`, `archived`
- `declaredChannel` (enum, required) — Where the creator says the link is used. A statement, never changed to match the traffic.
  - Allowed values: `social`, `email`, `messaging`, `search`, `display`, `video`, `affiliate`, `offline`, `other`
- `campaignRef` (string, required, nullable) — The campaign the link belongs to, or `null`.
- `utm` (MarketingLinkUtm, required) — The UTM values of the link. Each is `null` when not set.
- `creativeName` (string, required, nullable) — The name of the creative the link is used with, or `null`.
- `tdsLinkRef` (string, required, nullable) — The reference of the tracked link behind this marketing link, or `null` while none exists.
- `shareableUrl` (string, required, nullable) — The URL to share, or `null` when the link has no tracked link yet or this deployment gives no shareable URL.
- `traffic` (MarketingLinkTraffic, required, nullable) — Visits to the link over the 30 days before the request, or `null` when EVVA cannot report them. `null` never means "no traffic".
- `outcomes` (MarketingLinkOutcomes, required, nullable) — What the link earned over the same period as `traffic`, counted from the orders credited to it, or `null` when EVVA cannot report it.
- `createdAt` (datetime, required) — When the link was created.
- `updatedAt` (datetime, required) — When the link last changed.

### RateLimitErrorDetails

Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

- `retryAfterSec` (integer, required)
- `level` (enum, optional) — The DM send limit that refused the message, set only with `TOO_MANY_MESSAGES`. It is never a quota, a count or a key. - `conversation` — one side of one thread. - `sender` — a person's own ceiling; it does not apply to applications. - `creator` — everything sent for the creator, studio included. - `application` — everything your application sends. - `agency` — everything your agency sends. - `platform` — the agency's fair share of the platform: its throughput or its concurrency. See [rate limits](/authentication/rate-limits).
  - Allowed values: `conversation`, `sender`, `creator`, `application`, `agency`, `platform`

### MarketingLinkUtm

The UTM values of the link. Each is `null` when not set.

- `source` (string, required, nullable) — `utm_source`.
- `medium` (string, required, nullable) — `utm_medium`.
- `campaign` (string, required, nullable) — `utm_campaign`.
- `content` (string, required, nullable) — `utm_content`.
- `term` (string, required, nullable) — `utm_term`.

### MarketingLinkTraffic

Visits to the link over the 30 days before the request, or `null` when EVVA cannot report them. `null` never means "no traffic".

- `servedCount` (integer, required) — Visits the link sent on to its destination.
- `refusedCount` (integer, required) — Visits the link refused.
- `windowFrom` (datetime, required) — The start of the counted period, included.
- `windowTo` (datetime, required) — The end of the counted period, excluded.

### MarketingLinkOutcomes

What the link earned over the same period as `traffic`, counted from the orders credited to it, or `null` when EVVA cannot report it.

- `follows` (integer, required, nullable) — Always `null` for now: EVVA does not record which link a follow came from.
- `subscriptions` (integer, required) — Subscriptions that started through the link: a fully paid first period or a free trial begun. A renewal or a trial's conversion does not count again.
- `revenue` (MarketingLinkOutcomesRevenue, required, nullable) — The creator's share of the fully paid orders credited to the link, renewals and conversions included, after the platform's share and net of refunds and chargebacks. `null` unless your application's effective access to the creator covers `read:revenue`.
- `windowFrom` (datetime, required) — The start of the counted period, included. The same as `traffic`.
- `windowTo` (datetime, required) — The end of the counted period, excluded. The same as `traffic`.

### MarketingLinkOutcomesRevenue

The creator's share of the fully paid orders credited to the link, renewals and conversions included, after the platform's share and net of refunds and chargebacks. `null` unless your application's effective access to the creator covers `read:revenue`.

- `minor` (string, required) — Minor units as a decimal string, never a JSON number.
- `currency` (string, required) — The currency of `minor`.

## Examples

**Request**

```json
{
  "name": "Winter launch bio link",
  "destination": "https://example.com/mira_studio",
  "declaredChannel": "social",
  "utm": {
    "source": "bio",
    "medium": "social",
    "campaign": "winter_launch"
  },
  "creativeName": "Story frame A"
}
```

**Response**

```json
{
  "link": {
    "ref": "2f7a9c41-6e3b-4d58-9b20-8a1c5e7f3d96",
    "principal": "cm4r7k2xq0001qz8w3n5v6b2d",
    "name": "Winter launch bio link",
    "destination": "https://example.com/mira_studio",
    "state": "active",
    "declaredChannel": "social",
    "campaignRef": null,
    "utm": {
      "source": "bio",
      "medium": "social",
      "campaign": "winter_launch",
      "content": null,
      "term": null
    },
    "creativeName": "Story frame A",
    "tdsLinkRef": "b41d7e92-3c5a-4f18-9e6b-2d8a0c7f5e31",
    "shareableUrl": "https://go.example.com/r/Kq7vN2xR9mT4pL8sW3yZ6bHd",
    "traffic": {
      "servedCount": 0,
      "refusedCount": 0,
      "windowFrom": "2026-11-02T09:15:03.948Z",
      "windowTo": "2026-12-02T09:15:03.948Z"
    },
    "outcomes": {
      "follows": null,
      "subscriptions": 0,
      "revenue": {
        "minor": "0",
        "currency": "USD"
      },
      "windowFrom": "2026-11-02T09:15:03.948Z",
      "windowTo": "2026-12-02T09:15:03.948Z"
    },
    "createdAt": "2026-12-02T09:15:03.512Z",
    "updatedAt": "2026-12-02T09:15:03.948Z"
  }
}
```

**SDK Code**

```python Links_createMarketingLink_example
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/links"

payload = {
    "name": "Winter launch bio link",
    "destination": "https://example.com/mira_studio",
    "declaredChannel": "social",
    "utm": {
        "source": "bio",
        "medium": "social",
        "campaign": "winter_launch"
    },
    "creativeName": "Story frame A"
}
headers = {
    "Idempotency-Key": "0134b1b9-c983-4e74-9d84-a07cf5b763df",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go Links_createMarketingLink_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/links"

	payload := strings.NewReader("{\n  \"name\": \"Winter launch bio link\",\n  \"destination\": \"https://example.com/mira_studio\",\n  \"declaredChannel\": \"social\",\n  \"utm\": {\n    \"source\": \"bio\",\n    \"medium\": \"social\",\n    \"campaign\": \"winter_launch\"\n  },\n  \"creativeName\": \"Story frame A\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "0134b1b9-c983-4e74-9d84-a07cf5b763df")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Links_createMarketingLink_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/links', [
  'body' => '{
  "name": "Winter launch bio link",
  "destination": "https://example.com/mira_studio",
  "declaredChannel": "social",
  "utm": {
    "source": "bio",
    "medium": "social",
    "campaign": "winter_launch"
  },
  "creativeName": "Story frame A"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '0134b1b9-c983-4e74-9d84-a07cf5b763df',
  ],
]);

echo $response->getBody();
```