Partners

Embed
Preview of the card
<a href="https://referalli.com/docs/ref-partners"><img src="https://referalli.com/docs/_api/public/orgs/07f432f4-34b9-46a7-aaad-c0e395d2e4f9/spaces/2bf4f614-3630-4fbf-85f9-5ecafa6b7d97/pages/f3baf0d6-c9c0-4146-9581-828b0a605c81/social-card.svg?v=3e7ae33eec8b" alt="Partners" width="600" height="315"></a>
GEThttps://referalli.com/v1/partners
List partners

Partners, newest first. Filter by email, externalRef or status. Archived partners are hidden unless you ask for them with status=archived or includeArchived=true.

Auth: an API key with partners:read (or full), or a session of any role.

Parameters
emailstringquery
externalRefstringquery
statusstringquery
active | suspended | banned | archived
includeArchivedstringquery
true | false
limitintegerquery
Items per page, 1 to 100 (default 50). From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
= 50
starting_afterstringquery
A cursor: the id of an item (the previous page's next_cursor); returns the items after it. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
ending_beforestringquery
A cursor: returns the items before this item id (the previous page). Not with starting_after. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[gte]stringquery
Only items created at or after this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[lte]stringquery
Only items created at or before this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
referalli-versionstringheader
The API version to run the request under (2026-10-21, 2026-11-01). Default: the API key's pinned version, else 2026-10-21. The header name from before the rename is still accepted; this name wins when both are sent.
2026-10-21 | 2026-11-01
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X GET "https://referalli.com/v1/partners?email=&externalRef=&status=&includeArchived=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=" \
  -H "referalli-version: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/partners?email=&externalRef=&status=&includeArchived=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=', {
  method: 'GET',
  headers: {
    'referalli-version': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referalli.com/v1/partners?email=&externalRef=&status=&includeArchived=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=",
    headers={
    "referalli-version": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://referalli.com/v1/partners?email=&externalRef=&status=&includeArchived=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=", nil)
	req.Header.Set("referalli-version", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/partners?email=&externalRef=&status=&includeArchived=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['referalli-version: <value>', 'x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/partners?email=&externalRef=&status=&includeArchived=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=')
req = Net::HTTP::Get.new(uri)
req['referalli-version'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/partners?email=&externalRef=&status=&includeArchived=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D="))
    .header("referalli-version", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 A page of the list. Under API version 2026-10-21 the body is the plain array instead.
Example
{
  "object": "string",
  "data": [
    {
      "id": "string",
      "email": "string",
      "displayName": "string",
      "externalRef": "string",
      "status": "active",
      "tags": [
        "string"
      ],
      "notes": "string",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
Schema
objectstringrequired
dataPartner[]required
Show child parameters
idstringrequired
emailstringrequired
displayNamestringrequired
externalRefstringrequired
statusstringrequired
active | suspended | banned | archived
tagsstring[]required
notesstringrequired
createdAtstringrequired
has_morebooleanrequired
Whether another page follows; pass next_cursor as starting_after to get it.
next_cursorstringrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referalli.com/v1/partners
Create a partner

Creates a partner. email is unique per org, and so is externalRef (your own id for them, such as a user id). With upsert: true an existing partner matching the email or externalRef is returned instead of a 409 (and gets the externalRef if it had none). Over the plan's partner limit this is 402 payment_required. Audited.

Auth: an API key with partners:write (or full), or a session with role owner, admin.

Parameters
Idempotency-Keystringheader
Any unique string up to 255 printable ASCII characters (a UUID). A retry with the same key within 24 hours gets the first response again (with idempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Request body application/json
emailstringrequired
displayNamestring
tagsstring[]
= []
notesstring
externalRefstring
upsertboolean
= false
{
  "email": "string",
  "displayName": "",
  "tags": [],
  "notes": "",
  "externalRef": "string",
  "upsert": false
}
Code samples
cURL
curl -X POST "https://referalli.com/v1/partners" \
  -H "Idempotency-Key: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>" \
  -H "Content-Type: application/json" \
  -d '{"email":"string","displayName":"","tags":[],"notes":"","externalRef":"string","upsert":false}'
TypeScript
const res = await fetch('https://referalli.com/v1/partners', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"email":"string","displayName":"","tags":[],"notes":"","externalRef":"string","upsert":false}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referalli.com/v1/partners",
    headers={
    "Idempotency-Key": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    "Content-Type": "application/json",
    },
    json={"email": "string", "displayName": "", "tags": [], "notes": "", "externalRef": "string", "upsert": False},
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://referalli.com/v1/partners", strings.NewReader(`{"email":"string","displayName":"","tags":[],"notes":"","externalRef":"string","upsert":false}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/partners');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'x-org-id: <value>', 'referalli-mode: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"email":"string","displayName":"","tags":[],"notes":"","externalRef":"string","upsert":false}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/partners')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"email":"string","displayName":"","tags":[],"notes":"","externalRef":"string","upsert":false}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/partners"))
    .header("Idempotency-Key", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"email\":\"string\",\"displayName\":\"\",\"tags\":[],\"notes\":\"\",\"externalRef\":\"string\",\"upsert\":false}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "email": "string",
  "displayName": "string",
  "externalRef": "string",
  "status": "active",
  "tags": [
    "string"
  ],
  "notes": "string",
  "createdAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
emailstringrequired
displayNamestringrequired
externalRefstringrequired
statusstringrequired
active | suspended | banned | archived
tagsstring[]required
notesstringrequired
createdAtstringrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
402 The plan's limit is reached. error.code is one of:
Example
{
  "error": {
    "code": "payment_required",
    "message": "a plan limit or feature",
    "docs_url": "https://referalli.com/docs/errors-and-limits#payment_required"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
409 The request conflicts with the current state. error.code is one of:
Example
{
  "error": {
    "code": "conflict",
    "message": "a unique value is taken, or the action would break a rule (the message says which)",
    "docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
422 The request cannot be processed as sent. error.code is one of:
Example
{
  "error": {
    "code": "idempotency_key_reused",
    "message": "the `idempotency-key` was used for a different request",
    "docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referalli.com/v1/partners/{id}
Get a partner

One partner, with a cross-network warning when the same account is flagged or banned by other merchants (it never says which).

Auth: an API key with partners:read (or full), or a session of any role.

Parameters
idstringpathrequired
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X GET "https://referalli.com/v1/partners/{id}" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/partners/{id}', {
  method: 'GET',
  headers: {
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referalli.com/v1/partners/{id}",
    headers={
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://referalli.com/v1/partners/{id}", nil)
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/partners/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/partners/{id}')
req = Net::HTTP::Get.new(uri)
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/partners/{id}"))
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "email": "string",
  "displayName": "string",
  "externalRef": "string",
  "status": "active",
  "tags": [
    "string"
  ],
  "notes": "string",
  "createdAt": "2024-01-01T00:00:00Z",
  "networkWarning": {
    "flagged": true,
    "reason": "platform_flagged",
    "bannedByOtherMerchants": 0
  }
}
Schema
idstringrequired
emailstringrequired
displayNamestringrequired
externalRefstringrequired
statusstringrequired
active | suspended | banned | archived
tagsstring[]required
notesstringrequired
createdAtstringrequired
networkWarningobjectrequired
Show child parameters
flaggedbooleanrequired
reasonstringrequired
bannedByOtherMerchantsintegerrequired
Other merchants that banned this account; 0 below the threshold (2). Never says which.
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
DELETEhttps://referalli.com/v1/partners/{id}
Delete a partner

Deletes a partner that never did anything, with its enrollments, links, coupons and payout profile. A partner with any clicks, referrals, commissions, payouts or other history is 409: archive it instead (status: "archived"). Audited.

Auth: an API key with partners:write (or full), or a session with role owner, admin.

Parameters
idstringpathrequired
Idempotency-Keystringheader
Any unique string up to 255 printable ASCII characters (a UUID). A retry with the same key within 24 hours gets the first response again (with idempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X DELETE "https://referalli.com/v1/partners/{id}" \
  -H "Idempotency-Key: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/partners/{id}', {
  method: 'DELETE',
  headers: {
    'Idempotency-Key': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "DELETE",
    "https://referalli.com/v1/partners/{id}",
    headers={
    "Idempotency-Key": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("DELETE", "https://referalli.com/v1/partners/{id}", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/partners/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/partners/{id}')
req = Net::HTTP::Delete.new(uri)
req['Idempotency-Key'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/partners/{id}"))
    .header("Idempotency-Key", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "ok": true
}
Schema
okbooleanrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
409 The request conflicts with the current state. error.code is one of:
Example
{
  "error": {
    "code": "conflict",
    "message": "a unique value is taken, or the action would break a rule (the message says which)",
    "docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
422 The request cannot be processed as sent. error.code is one of:
Example
{
  "error": {
    "code": "idempotency_key_reused",
    "message": "the `idempotency-key` was used for a different request",
    "docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
PATCHhttps://referalli.com/v1/partners/{id}
Update a partner

Changes the display name, status (active, suspended, banned, archived), tags, notes or externalRef (null clears it). Suspended partners keep earning but are not paid; banned ones stop attributing. 409 when another partner has the externalRef. Audited.

Auth: an API key with partners:write (or full), or a session with role owner, admin.

Parameters
idstringpathrequired
Idempotency-Keystringheader
Any unique string up to 255 printable ASCII characters (a UUID). A retry with the same key within 24 hours gets the first response again (with idempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Request body application/json
displayNamestring
statusstring
active | suspended | banned | archived
tagsstring[]
notesstring
externalRefstring
{
  "displayName": "string",
  "status": "active",
  "tags": [
    "string"
  ],
  "notes": "string",
  "externalRef": "string"
}
Code samples
cURL
curl -X PATCH "https://referalli.com/v1/partners/{id}" \
  -H "Idempotency-Key: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>" \
  -H "Content-Type: application/json" \
  -d '{"displayName":"string","status":"active","tags":["string"],"notes":"string","externalRef":"string"}'
TypeScript
const res = await fetch('https://referalli.com/v1/partners/{id}', {
  method: 'PATCH',
  headers: {
    'Idempotency-Key': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"displayName":"string","status":"active","tags":["string"],"notes":"string","externalRef":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "PATCH",
    "https://referalli.com/v1/partners/{id}",
    headers={
    "Idempotency-Key": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    "Content-Type": "application/json",
    },
    json={"displayName": "string", "status": "active", "tags": ["string"], "notes": "string", "externalRef": "string"},
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("PATCH", "https://referalli.com/v1/partners/{id}", strings.NewReader(`{"displayName":"string","status":"active","tags":["string"],"notes":"string","externalRef":"string"}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/partners/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'x-org-id: <value>', 'referalli-mode: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"displayName":"string","status":"active","tags":["string"],"notes":"string","externalRef":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/partners/{id}')
req = Net::HTTP::Patch.new(uri)
req['Idempotency-Key'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"displayName":"string","status":"active","tags":["string"],"notes":"string","externalRef":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/partners/{id}"))
    .header("Idempotency-Key", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .header("Content-Type", "application/json")
    .method("PATCH", BodyPublishers.ofString("{\"displayName\":\"string\",\"status\":\"active\",\"tags\":[\"string\"],\"notes\":\"string\",\"externalRef\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "email": "string",
  "displayName": "string",
  "externalRef": "string",
  "status": "active",
  "tags": [
    "string"
  ],
  "notes": "string",
  "createdAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
emailstringrequired
displayNamestringrequired
externalRefstringrequired
statusstringrequired
active | suspended | banned | archived
tagsstring[]required
notesstringrequired
createdAtstringrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
409 The request conflicts with the current state. error.code is one of:
Example
{
  "error": {
    "code": "conflict",
    "message": "a unique value is taken, or the action would break a rule (the message says which)",
    "docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
422 The request cannot be processed as sent. error.code is one of:
Example
{
  "error": {
    "code": "idempotency_key_reused",
    "message": "the `idempotency-key` was used for a different request",
    "docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referalli.com/v1/partners/{id}/enrollments
List a partner's enrollments

The programs a partner is enrolled in or applied to, with status and group.

Auth: an API key with partners:read (or full), or a session of any role.

Parameters
idstringpathrequired
limitintegerquery
Items per page, 1 to 100 (default 50). From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
= 50
starting_afterstringquery
A cursor: the id of an item (the previous page's next_cursor); returns the items after it. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
ending_beforestringquery
A cursor: returns the items before this item id (the previous page). Not with starting_after. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[gte]stringquery
Only items created at or after this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[lte]stringquery
Only items created at or before this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
referalli-versionstringheader
The API version to run the request under (2026-10-21, 2026-11-01). Default: the API key's pinned version, else 2026-10-21. The header name from before the rename is still accepted; this name wins when both are sent.
2026-10-21 | 2026-11-01
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X GET "https://referalli.com/v1/partners/{id}/enrollments?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=" \
  -H "referalli-version: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/partners/{id}/enrollments?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=', {
  method: 'GET',
  headers: {
    'referalli-version': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referalli.com/v1/partners/{id}/enrollments?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=",
    headers={
    "referalli-version": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://referalli.com/v1/partners/{id}/enrollments?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=", nil)
	req.Header.Set("referalli-version", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/partners/{id}/enrollments?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['referalli-version: <value>', 'x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/partners/{id}/enrollments?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=')
req = Net::HTTP::Get.new(uri)
req['referalli-version'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/partners/{id}/enrollments?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D="))
    .header("referalli-version", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 A page of the list. Under API version 2026-10-21 the body is the plain array instead.
Example
{
  "object": "string",
  "data": [
    {
      "id": "string",
      "programId": "string",
      "programName": "string",
      "status": "string",
      "groupId": "string",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
Schema
objectstringrequired
dataobject[]required
Show child parameters
idstringrequired
programIdstringrequired
programNamestringrequired
statusstringrequired
groupIdstringrequired
createdAtstringrequired
has_morebooleanrequired
Whether another page follows; pass next_cursor as starting_after to get it.
next_cursorstringrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referalli.com/v1/disputes
List partner disputes

Disputes partners filed with this org, newest first.

Auth: an API key with commissions:read (or full), or a session of any role.

Parameters
limitintegerquery
Items per page, 1 to 100 (default 50). From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
= 50
starting_afterstringquery
A cursor: the id of an item (the previous page's next_cursor); returns the items after it. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
ending_beforestringquery
A cursor: returns the items before this item id (the previous page). Not with starting_after. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[gte]stringquery
Only items created at or after this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[lte]stringquery
Only items created at or before this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
referalli-versionstringheader
The API version to run the request under (2026-10-21, 2026-11-01). Default: the API key's pinned version, else 2026-10-21. The header name from before the rename is still accepted; this name wins when both are sent.
2026-10-21 | 2026-11-01
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X GET "https://referalli.com/v1/disputes?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=" \
  -H "referalli-version: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/disputes?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=', {
  method: 'GET',
  headers: {
    'referalli-version': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referalli.com/v1/disputes?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=",
    headers={
    "referalli-version": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://referalli.com/v1/disputes?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=", nil)
	req.Header.Set("referalli-version", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/disputes?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['referalli-version: <value>', 'x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/disputes?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=')
req = Net::HTTP::Get.new(uri)
req['referalli-version'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/disputes?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D="))
    .header("referalli-version", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 A page of the list. Under API version 2026-10-21 the body is the plain array instead.
Example
{
  "object": "string",
  "data": [
    {
      "id": "string",
      "partnerId": "string",
      "partnerEmail": "string",
      "referralId": "string",
      "kind": "string",
      "status": "string",
      "detail": "string",
      "resolution": "string",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
Schema
objectstringrequired
dataobject[]required
Show child parameters
idstringrequired
partnerIdstringrequired
partnerEmailstringrequired
referralIdstringrequired
kindstringrequired
statusstringrequired
detailstringrequired
resolutionstringrequired
createdAtstringrequired
has_morebooleanrequired
Whether another page follows; pass next_cursor as starting_after to get it.
next_cursorstringrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referalli.com/v1/disputes/{id}/resolve
Resolve a dispute

Resolves an open dispute with a resolution note, which the partner sees. Publishes dispute.resolved. 404 when not open. Audited.

Auth: an API key with commissions:write (or full), or a session with role owner, admin.

Parameters
idstringpathrequired
Idempotency-Keystringheader
Any unique string up to 255 printable ASCII characters (a UUID). A retry with the same key within 24 hours gets the first response again (with idempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Request body application/json
resolutionstringrequired
{
  "resolution": "string"
}
Code samples
cURL
curl -X POST "https://referalli.com/v1/disputes/{id}/resolve" \
  -H "Idempotency-Key: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>" \
  -H "Content-Type: application/json" \
  -d '{"resolution":"string"}'
TypeScript
const res = await fetch('https://referalli.com/v1/disputes/{id}/resolve', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"resolution":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referalli.com/v1/disputes/{id}/resolve",
    headers={
    "Idempotency-Key": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    "Content-Type": "application/json",
    },
    json={"resolution": "string"},
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://referalli.com/v1/disputes/{id}/resolve", strings.NewReader(`{"resolution":"string"}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/disputes/{id}/resolve');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'x-org-id: <value>', 'referalli-mode: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"resolution":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/disputes/{id}/resolve')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"resolution":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/disputes/{id}/resolve"))
    .header("Idempotency-Key", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"resolution\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "ok": true
}
Schema
okbooleanrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
409 The request conflicts with the current state. error.code is one of:
Example
{
  "error": {
    "code": "conflict",
    "message": "a unique value is taken, or the action would break a rule (the message says which)",
    "docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
422 The request cannot be processed as sent. error.code is one of:
Example
{
  "error": {
    "code": "idempotency_key_reused",
    "message": "the `idempotency-key` was used for a different request",
    "docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referalli.com/v1/contracts
List partner contracts

The org's contracts and their status (draft, sent, accepted, declined, void).

Auth: an API key with partners:read (or full), or a session with role owner, admin.

Parameters
limitintegerquery
Items per page, 1 to 100 (default 50). From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
= 50
starting_afterstringquery
A cursor: the id of an item (the previous page's next_cursor); returns the items after it. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
ending_beforestringquery
A cursor: returns the items before this item id (the previous page). Not with starting_after. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[gte]stringquery
Only items created at or after this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[lte]stringquery
Only items created at or before this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
referalli-versionstringheader
The API version to run the request under (2026-10-21, 2026-11-01). Default: the API key's pinned version, else 2026-10-21. The header name from before the rename is still accepted; this name wins when both are sent.
2026-10-21 | 2026-11-01
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X GET "https://referalli.com/v1/contracts?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=" \
  -H "referalli-version: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/contracts?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=', {
  method: 'GET',
  headers: {
    'referalli-version': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referalli.com/v1/contracts?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=",
    headers={
    "referalli-version": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://referalli.com/v1/contracts?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=", nil)
	req.Header.Set("referalli-version", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/contracts?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['referalli-version: <value>', 'x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/contracts?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=')
req = Net::HTTP::Get.new(uri)
req['referalli-version'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/contracts?limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D="))
    .header("referalli-version", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 A page of the list. Under API version 2026-10-21 the body is the plain array instead.
Example
{
  "object": "string",
  "data": [
    {
      "id": "string",
      "programId": "string",
      "partnerId": "string",
      "title": "string",
      "compensation": {},
      "status": "string",
      "createdAt": "2024-01-01T00:00:00Z",
      "respondedAt": "2024-01-01T00:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
Schema
objectstringrequired
dataobject[]required
Show child parameters
idstringrequired
programIdstringrequired
partnerIdstringrequired
titlestringrequired
compensationobjectrequired
statusstringrequired
createdAtstringrequired
respondedAtstringrequired
has_morebooleanrequired
Whether another page follows; pass next_cursor as starting_after to get it.
next_cursorstringrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referalli.com/v1/contracts
Create a partner contract

A contract offering one partner custom terms (termsMd) and compensation (percent or fixed) in a program, as a draft or sent at once (send: true). When accepted, the compensation becomes a partner override on a new rule version. Audited.

Auth: an API key with partners:write (or full), or a session with role owner, admin.

Parameters
Idempotency-Keystringheader
Any unique string up to 255 printable ASCII characters (a UUID). A retry with the same key within 24 hours gets the first response again (with idempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Request body application/json
programIdstringrequired
partnerIdstringrequired
titlestring
termsMdstring
compensationobjectrequired
sendboolean
= false
{
  "programId": "string",
  "partnerId": "string",
  "title": "",
  "termsMd": "",
  "compensation": {
    "kind": "string",
    "bps": 0
  },
  "send": false
}
Code samples
cURL
curl -X POST "https://referalli.com/v1/contracts" \
  -H "Idempotency-Key: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>" \
  -H "Content-Type: application/json" \
  -d '{"programId":"string","partnerId":"string","title":"","termsMd":"","compensation":{"kind":"string","bps":0},"send":false}'
TypeScript
const res = await fetch('https://referalli.com/v1/contracts', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"programId":"string","partnerId":"string","title":"","termsMd":"","compensation":{"kind":"string","bps":0},"send":false}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referalli.com/v1/contracts",
    headers={
    "Idempotency-Key": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    "Content-Type": "application/json",
    },
    json={"programId": "string", "partnerId": "string", "title": "", "termsMd": "", "compensation": {"kind": "string", "bps": 0}, "send": False},
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://referalli.com/v1/contracts", strings.NewReader(`{"programId":"string","partnerId":"string","title":"","termsMd":"","compensation":{"kind":"string","bps":0},"send":false}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/contracts');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'x-org-id: <value>', 'referalli-mode: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"programId":"string","partnerId":"string","title":"","termsMd":"","compensation":{"kind":"string","bps":0},"send":false}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/contracts')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"programId":"string","partnerId":"string","title":"","termsMd":"","compensation":{"kind":"string","bps":0},"send":false}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/contracts"))
    .header("Idempotency-Key", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"programId\":\"string\",\"partnerId\":\"string\",\"title\":\"\",\"termsMd\":\"\",\"compensation\":{\"kind\":\"string\",\"bps\":0},\"send\":false}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "status": "draft"
}
Schema
idstringrequired
statusstringrequired
draft | sent
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
409 The request conflicts with the current state. error.code is one of:
Example
{
  "error": {
    "code": "conflict",
    "message": "a unique value is taken, or the action would break a rule (the message says which)",
    "docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
422 The request cannot be processed as sent. error.code is one of:
Example
{
  "error": {
    "code": "idempotency_key_reused",
    "message": "the `idempotency-key` was used for a different request",
    "docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referalli.com/v1/contracts/{id}/send
Send a contract

Sends a draft contract to the partner. 400 when it is not a draft.

Auth: an API key with partners:write (or full), or a session with role owner, admin.

Parameters
idstringpathrequired
Idempotency-Keystringheader
Any unique string up to 255 printable ASCII characters (a UUID). A retry with the same key within 24 hours gets the first response again (with idempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X POST "https://referalli.com/v1/contracts/{id}/send" \
  -H "Idempotency-Key: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/contracts/{id}/send', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referalli.com/v1/contracts/{id}/send",
    headers={
    "Idempotency-Key": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://referalli.com/v1/contracts/{id}/send", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/contracts/{id}/send');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/contracts/{id}/send')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/contracts/{id}/send"))
    .header("Idempotency-Key", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "ok": true,
  "status": "string"
}
Schema
okbooleanrequired
statusstringrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
409 The request conflicts with the current state. error.code is one of:
Example
{
  "error": {
    "code": "conflict",
    "message": "a unique value is taken, or the action would break a rule (the message says which)",
    "docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
422 The request cannot be processed as sent. error.code is one of:
Example
{
  "error": {
    "code": "idempotency_key_reused",
    "message": "the `idempotency-key` was used for a different request",
    "docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referalli.com/v1/assets
List marketing assets

Marketing assets, filtered by programId.

Auth: an API key with partners:read (or full), or a session of any role.

Parameters
programIdstringquery
limitintegerquery
Items per page, 1 to 100 (default 50). From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
= 50
starting_afterstringquery
A cursor: the id of an item (the previous page's next_cursor); returns the items after it. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
ending_beforestringquery
A cursor: returns the items before this item id (the previous page). Not with starting_after. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[gte]stringquery
Only items created at or after this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
created[lte]stringquery
Only items created at or before this time (ISO 8601), on lists of timestamped records. From API version 2026-11-01; ignored under 2026-10-21, where lists are a capped plain array.
referalli-versionstringheader
The API version to run the request under (2026-10-21, 2026-11-01). Default: the API key's pinned version, else 2026-10-21. The header name from before the rename is still accepted; this name wins when both are sent.
2026-10-21 | 2026-11-01
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X GET "https://referalli.com/v1/assets?programId=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=" \
  -H "referalli-version: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/assets?programId=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=', {
  method: 'GET',
  headers: {
    'referalli-version': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referalli.com/v1/assets?programId=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=",
    headers={
    "referalli-version": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://referalli.com/v1/assets?programId=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=", nil)
	req.Header.Set("referalli-version", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/assets?programId=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['referalli-version: <value>', 'x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/assets?programId=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D=')
req = Net::HTTP::Get.new(uri)
req['referalli-version'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/assets?programId=&limit=&starting_after=&ending_before=&created%5Bgte%5D=&created%5Blte%5D="))
    .header("referalli-version", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 A page of the list. Under API version 2026-10-21 the body is the plain array instead.
Example
{
  "object": "string",
  "data": [
    {
      "id": "string",
      "programId": "string",
      "kind": "string",
      "title": "string",
      "content": "string",
      "dimensions": "string",
      "groupId": "string",
      "clicks": 0,
      "referrals": 0,
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
Schema
objectstringrequired
dataobject[]required
Show child parameters
idstringrequired
programIdstringrequired
kindstringrequired
titlestringrequired
contentstringrequired
dimensionsstringrequired
groupIdstringrequired
clicksintegerrequired
referralsintegerrequired
createdAtstringrequired
has_morebooleanrequired
Whether another page follows; pass next_cursor as starting_after to get it.
next_cursorstringrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referalli.com/v1/assets
Create a marketing asset

Adds a marketing asset (banner, copy, video or logo) to a program for its approved partners, or only for one group's members with groupId.

Auth: an API key with partners:write (or full), or a session with role owner, admin.

Parameters
Idempotency-Keystringheader
Any unique string up to 255 printable ASCII characters (a UUID). A retry with the same key within 24 hours gets the first response again (with idempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Request body application/json
programIdstringrequired
kindstringrequired
banner | copy | video | logo
titlestringrequired
contentstring
dimensionsstring
groupIdstring
{
  "programId": "string",
  "kind": "banner",
  "title": "string",
  "content": "",
  "dimensions": "",
  "groupId": "string"
}
Code samples
cURL
curl -X POST "https://referalli.com/v1/assets" \
  -H "Idempotency-Key: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>" \
  -H "Content-Type: application/json" \
  -d '{"programId":"string","kind":"banner","title":"string","content":"","dimensions":"","groupId":"string"}'
TypeScript
const res = await fetch('https://referalli.com/v1/assets', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"programId":"string","kind":"banner","title":"string","content":"","dimensions":"","groupId":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referalli.com/v1/assets",
    headers={
    "Idempotency-Key": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    "Content-Type": "application/json",
    },
    json={"programId": "string", "kind": "banner", "title": "string", "content": "", "dimensions": "", "groupId": "string"},
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://referalli.com/v1/assets", strings.NewReader(`{"programId":"string","kind":"banner","title":"string","content":"","dimensions":"","groupId":"string"}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/assets');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'x-org-id: <value>', 'referalli-mode: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"programId":"string","kind":"banner","title":"string","content":"","dimensions":"","groupId":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/assets')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"programId":"string","kind":"banner","title":"string","content":"","dimensions":"","groupId":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/assets"))
    .header("Idempotency-Key", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"programId\":\"string\",\"kind\":\"banner\",\"title\":\"string\",\"content\":\"\",\"dimensions\":\"\",\"groupId\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "programId": "string",
  "kind": "string",
  "title": "string",
  "content": "string",
  "dimensions": "string",
  "groupId": "string"
}
Schema
idstringrequired
programIdstringrequired
kindstringrequired
titlestringrequired
contentstringrequired
dimensionsstringrequired
groupIdstring
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
409 The request conflicts with the current state. error.code is one of:
Example
{
  "error": {
    "code": "conflict",
    "message": "a unique value is taken, or the action would break a rule (the message says which)",
    "docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
422 The request cannot be processed as sent. error.code is one of:
Example
{
  "error": {
    "code": "idempotency_key_reused",
    "message": "the `idempotency-key` was used for a different request",
    "docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
DELETEhttps://referalli.com/v1/assets/{id}
Delete a marketing asset

Removes a marketing asset.

Auth: an API key with partners:write (or full), or a session with role owner, admin.

Parameters
idstringpathrequired
Idempotency-Keystringheader
Any unique string up to 255 printable ASCII characters (a UUID). A retry with the same key within 24 hours gets the first response again (with idempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.
x-org-idstringheader
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-modestringheader
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test
Code samples
cURL
curl -X DELETE "https://referalli.com/v1/assets/{id}" \
  -H "Idempotency-Key: <value>" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
const res = await fetch('https://referalli.com/v1/assets/{id}', {
  method: 'DELETE',
  headers: {
    'Idempotency-Key': '<value>',
    'x-org-id': '<value>',
    'referalli-mode': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "DELETE",
    "https://referalli.com/v1/assets/{id}",
    headers={
    "Idempotency-Key": "<value>",
    "x-org-id": "<value>",
    "referalli-mode": "<value>",
    },
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("DELETE", "https://referalli.com/v1/assets/{id}", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("x-org-id", "<value>")
	req.Header.Set("referalli-mode", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referalli.com/v1/assets/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'x-org-id: <value>', 'referalli-mode: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referalli.com/v1/assets/{id}')
req = Net::HTTP::Delete.new(uri)
req['Idempotency-Key'] = '<value>'
req['x-org-id'] = '<value>'
req['referalli-mode'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referalli.com/v1/assets/{id}"))
    .header("Idempotency-Key", "<value>")
    .header("x-org-id", "<value>")
    .header("referalli-mode", "<value>")
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "ok": true
}
Schema
okbooleanrequired
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it), not a member, a suspended org, or a publishable key from an origin it does not allow",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
409 The request conflicts with the current state. error.code is one of:
Example
{
  "error": {
    "code": "conflict",
    "message": "a unique value is taken, or the action would break a rule (the message says which)",
    "docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
422 The request cannot be processed as sent. error.code is one of:
Example
{
  "error": {
    "code": "idempotency_key_reused",
    "message": "the `idempotency-key` was used for a different request",
    "docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
Updated