Scan your whole stack
From OX Research Newsroom
Are you using agilis-ads?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.2.0
agilis-ads was last scanned on 29 Nov 2026 at version 0.2.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.0 LATEST | 29 Nov 2026 | No rules fired |
| 0.1.0 | 22 Nov 2026 | No rules fired |
Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.2.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
The official Python library for the Agilis Advertising API, by Agilis Dating Ltd. The API is for approved businesses and agencies: create and manage local Offers and Events, estimate prices, read aggregated results and receive webhooks. It gives no access to member profiles, messages or any information that identifies a member.
httpx as the only dependencyTypedDict parameters and responses, py.typed)pip install agilis-ads
Create an API key in the Ad Portal under Manage API Keys, with the Ad Portal in Test mode. A pk_test_ key works in Test mode only: members never see what you create and nothing is charged.
export AGILIS_API_KEY=pk_test_...
from agilis_ads import Agilis
client = Agilis() # reads AGILIS_API_KEY
print(client.mode) # "test" or "live", decided by the key
result = client.categories.list()
print(len(result["categories"]))
The Test-mode integration tests make these same calls on every pull request. More in examples/: a Test-mode tour and a webhook receiver.
With a Live key (pk_live_) changes are real: members see your Offers and Events, and creating an Offer or publishing an Event is paid from the balance of the person who owns the API key. The Organisation balance in the Ad Portal is everyone's balances added together, not a shared wallet. Card payment is available for Offers only, through a payment link sent by email.
Operations that take an environment (TEST or LIVE) fill it in from the key when you leave it out. To make sure a script never runs against Live:
if client.mode != "test":
raise SystemExit("Use a Test-mode key")
Every error is an agilis_ads.AgilisError with http_status, return_code, message, body (the parsed response) and headers.
| Error | When |
|---|---|
AuthenticationError |
HTTP 401 (or no API key) |
agilis_ads.PermissionError |
HTTP 403 |
NotFoundError |
HTTP 404 |
ConflictError |
HTTP 409 |
InvalidRequestError |
HTTP 400 or 422, or HTTP 200 with a return_code starting with E |
RateLimitError |
HTTP 429; retry_after holds the seconds to wait |
ApiError |
HTTP 5xx and anything else unexpected |
agilis_ads.ConnectionError |
no response: the connection failed or timed out |
SignatureVerificationError |
a webhook could not be verified |
PermissionError and ConnectionError share their names with Python built-ins, so use them through the package (agilis_ads.PermissionError) rather than importing them by name.
Some refusals arrive as HTTP 200 with an E code, for example E3 when the balance is too low. They raise InvalidRequestError with http_status 200. Return codes are scoped to each endpoint; the API reference lists them.
import agilis_ads
try:
client.offers.create(params)
except agilis_ads.InvalidRequestError as error:
print("Refused:", error.return_code, error.message)
except agilis_ads.RateLimitError as error:
print("Slow down for", error.retry_after, "seconds")
except agilis_ads.AgilisError as error:
print("Failed:", error)
The same API, in six more languages:
@agilisdating/ads)agilisdating/agilis-ads)Agilis.Ads)dating.agilis:agilis-ads)github.com/agilisdating/agilis-ads-go)agilis-ads)To use Agilis from an AI assistant such as Claude or ChatGPT instead, connect the Agilis MCP server.
import httpx
from agilis_ads import Agilis
client = Agilis(
api_key="pk_test_...", # default: the AGILIS_API_KEY environment variable
base_url="https://ads.agilis.dating", # the default
timeout=60.0, # seconds per request; the default
max_retries=2, # the default
http_client=httpx.Client(), # optional: your own client (proxies, transports)
)
| Attribute | Meaning |
|---|---|
client.mode |
"test" for a pk_test_ key, "live" for a pk_live_ key |
client.environment |
"TEST" or "LIVE", as sent to the API |
client.is_live |
True for a Live key |
Use the client as a context manager (with Agilis() as client:), or call client.close() when done. A client you pass in as http_client is never closed by the SDK.
The key is sent in the x-api-key header only. It is never logged, never part of a URL, and never included in an error message.
Each method takes path parameters as arguments and everything else as one dict, with the API's own field names. Responses are the parsed JSON as a dict, with every field kept (including any the API adds later).
| Method | HTTP |
|---|---|
client.categories.list() |
GET /categories |
client.interests.list() |
GET /interests |
client.offers.estimate_price(params) |
POST /offers/price-estimate |
client.offers.create(params, *, idempotency_key=None, dry_run=False) |
POST /offers |
client.offers.list(params=None) |
GET /offers |
client.offers.iter_all(params=None) |
every page of GET /offers |
client.offers.get(offer_id) |
GET /offers/{offer_id} |
client.offers.pause(offer_id) |
POST /offers/{offer_id}/pause |
client.offers.resume(offer_id) |
POST /offers/{offer_id}/resume |
client.offers.analytics(offer_id, {"interval": "7d"}) |
GET /offers/{offer_id}/analytics |
client.offers.delete(offer_id, *, dry_run=False) |
DELETE /offers/{offer_id} |
client.event_categories.list() |
GET /event-categories |
client.event_currencies.list() |
GET /event-currencies |
client.event_config.get() |
GET /event-config |
client.events.preview(params=None) |
POST /events/preview |
client.events.publish(params, *, idempotency_key=None, dry_run=False) |
POST /events |
client.events.list(params=None) |
GET /events |
client.events.iter_all(params=None) |
every page of GET /events |
client.events.get(event_id) |
GET /events/{event_id} |
client.events.edit(event_id, params) |
PATCH /events/{event_id} (sent as POST with X-HTTP-Method-Override: PATCH) |
client.events.delete(event_id, *, dry_run=False) |
DELETE /events/{event_id} |
client.events.reschedule(event_id, params) |
POST /events/{event_id}/reschedule |
client.events.cancel(event_id, *, dry_run=False) |
POST /events/{event_id}/cancel |
client.events.analytics(event_id, {"interval": "all"}) |
GET /events/{event_id}/analytics |
client.webhook_endpoints.list() |
GET /webhook-endpoints |
client.webhook_endpoints.create(params) |
POST /webhook-endpoints |
client.webhook_endpoints.get(endpoint_id) |
GET /webhook-endpoints/{endpoint_id} |
client.webhook_endpoints.update(endpoint_id, params) |
PATCH /webhook-endpoints/{endpoint_id} |
client.webhook_endpoints.delete(endpoint_id) |
DELETE /webhook-endpoints/{endpoint_id} |
client.webhook_endpoints.roll_secret(endpoint_id, params=None) |
POST /webhook-endpoints/{endpoint_id}/roll-secret |
client.webhook_endpoints.send_test(endpoint_id, params=None) |
POST /webhook-endpoints/{endpoint_id}/test |
client.webhook_events.list(params=None) |
GET /webhook-events |
client.webhook_events.iter_all(params=None) |
every page of GET /webhook-events |
client.webhook_events.get(webhook_event_id) |
GET /webhook-events/{webhook_event_id} |
client.webhook_events.resend(webhook_event_id, params=None) |
POST /webhook-events/{webhook_event_id}/resend |
client.webhooks.construct_event(payload, header, secret, tolerance=300) |
verifies a received webhook; no request |
The parameter and response types are in agilis_ads.types (for example OfferCreateParams and OfferPage). The fields and their rules are described in the API reference.
offers.get reads one Offer by its id, with the same fields as an item of offers.list. An Offer of another account, or of the other mode, raises NotFoundError (E1).
offer = client.offers.get(45)
print(offer["title"], offer["offer_status"])
results = client.offers.analytics(45, {"interval": "30d"})
print(results["metrics"]["views"], results["metrics"]["clicks"])
for day in results["by_day"]: # one entry per day in results["time_zone"], oldest first
print(day["date"], day["views"], day["clicks"])
views = results["demographics"]["views"]
for group in views["groups"]: # 18 groups: six age groups, each with three genders
shown = "hidden" if group["hidden"] else group["count"]
print(group["age_group"], group["gender"], shown)
To protect members, an age-and-gender group with fewer than demographics["min_group_size"] views (or clicks) is hidden: its count is None and hidden is True. by_gender and total count only the groups shown. Agilis does not know whether a click led to a sale, a booking or a visit.
offers.create, events.preview, events.publish and events.edit are sent as multipart/form-data. Pass the image as a file path, bytes, a binary stream, or a (file_name, bytes_or_stream) tuple; the content type is detected from the file name.
client.events.publish(
{
"title": "Beginners Cuban Salsa: Friday Social",
"description": "Drop-in class for absolute beginners, followed by a social.",
"venue_name": "Bar Salsa",
"address": "96 Charing Cross Road",
"city": "London",
"country_code": "GB",
"location": [51.5133, -0.1300],
"starts_at": "2027-10-16T18:30:00Z",
"ends_at": "2027-10-16T23:00:00Z",
"url": "https://example.com/classes/friday",
"image": ("salsa.jpg", open("salsa.jpg", "rb")),
"crop": {"x": 0, "y": 120, "w": 1080},
"payment_method": "B",
}
)
Lists are sent as repeated fields (location[], gender[], interests[]) and crop as crop[x], crop[y] and crop[w]. events.edit is always sent as a multipart POST with X-HTTP-Method-Override: PATCH, with or without a new image, so its fields always reach the API.
Each result remembers the HTTP response it came from:
import agilis_ads
page = client.offers.list()
meta = agilis_ads.response_meta(page)
print(meta.status_code, meta.rate_limit_remaining, meta.headers.get("X-RateLimit-Limit"))
offers.list, events.list and webhook_events.list return one page: data and pagination (has_more, next_cursor). Pass next_cursor back as cursor for the next page, or let iter_all follow the pages for you:
for offer in client.offers.iter_all({"offer_status": "active", "limit": 100}):
print(offer["offer_id"], offer["title"])
iter_all is lazy: it fetches the next page only when the loop reaches it.
dry_run=True checks everything and says what it would cost, without creating anything:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.