Skip to navigation

API conventions

The rules every Partner API operation follows, one table each.

Learn these once; every operation in the API reference follows them.

Base URL and format

ItemConvention
Base URLhttps://api.evvahub.com
PathsAbsolute from the host, versioned in the path: /partner/v1/…
Token endpointPOST https://api.evvahub.com/partner/v1/oauth/token — see Requesting tokens
TransportHTTPS only
Request bodiesJSON (Content-Type: application/json), at most 100 KB. A larger body is 413, an unreadable one 400 or 415, all with code INVALID_REQUEST.
Success bodiesThe resource itself, with no wrapper. Lists return their rows (items, or a named array such as messages) plus paging fields.
CachingEvery response is Cache-Control: private, no-store. Never store responses in a shared cache.
Version headerEvery response carries API-Version: v1. See Versioning.

Authentication

ItemConvention
HeaderAuthorization: Bearer <access token>
TokenOpaque, starting evpa_live_ (live) or evpa_test_ (sandbox). Never parse it.
LifetimeRead expires_in from the token response. There is no refresh token: request a new one.
Bad or expired token401 INVALID_TOKEN with WWW-Authenticate: Bearer realm="evva-partner", error="invalid_token"

Agency and creator context

ItemConvention
AgencyTaken from your token. You do not need to send X-Agency-Id; if you do, it must name your agency (403 AGENCY_CONTEXT_MISMATCH otherwise).
CreatorTaken only from {creatorId} in the path: /partner/v1/accounts/{creatorId}/….
X-Creator-IdOptional echo of the path’s creatorId. Any other value is 403 CREATOR_CONTEXT_MISMATCH.
Creators you can reachGET /partner/v1/accounts lists them with the scopes you hold for each.
Another creator’s objectAnswered 404, exactly like a missing one.

Errors

Every error body has the same shape, on every operation and whichever layer refused the request:

Error envelope
{
"code": "OAUTH_SCOPE_MISSING",
"error": "The creator's consent does not cover this",
"requestId": "7d1f0a52-3b8e-4c69-a1d4-0e9b6f2c5a37"
}
FieldConvention
codeStable and machine-readable. Branch on it. New codes may appear within v1: treat an unknown code by its HTTP status.
errorHuman-readable. It may change; never branch on it.
detailsOptional and specific to the code: field errors, limits, the level that refused.
requestIdThe same value as the X-Request-Id response header.

The token and revocation endpoints are the exception: they answer standard OAuth 2.0 error bodies ({"error": "invalid_client", "error_description": "…"}). The full list is on Errors.

Correlation

ItemConvention
X-Request-Id (request)Optional. A value matching ^[A-Za-z0-9._-]{1,128}$ becomes the request id; any other value is replaced, never refused.
X-Request-Id (response)Always present: your value, or a UUID EVVA generates.
requestId (error body)The same value. Quote it when you contact EVVA about a request.

Rate-limit headers

HeaderConvention
X-RateLimit-LimitThe limit of the limiter that metered the request.
X-RateLimit-RemainingRequests left in the current window.
X-RateLimit-ResetWhen the window resets, in epoch seconds.
Retry-AfterOn every 429 and every 503, in seconds.

Details and backoff advice: Rate limits and quotas.

Idempotency

ItemConvention
HeaderIdempotency-Key, on the writes that declare it in the API reference
FormatTypically 1–128 characters of [A-Za-z0-9_-]
Same key, same requestThe first outcome is answered again; nothing happens twice.
Same key, different request409 — IDEMPOTENCY_KEY_REUSED on most operations
Key spaceYour application’s own. Your keys never collide with anyone else’s.

Details per operation family: Idempotency.

Paging

StyleRequestResponseExamples
Opaque cursorcursor and limitnextCursor (null at the end)Media albums and tags, comments, marketplace listings
Historybefore and takenextCursor, hasMoreConversation history, media and links shared in a conversation
Offsetskip and taketotal, skip, takeMass messages, media assets, content, orders
Event feedafter and limitnextCursor, hasMoreGET /partner/v1/events

Cursors are opaque: pass them back exactly as received. Details: Pagination and cursors.

Compatibility

Within /partner/v1 EVVA makes additive changes only. Write your client to tolerate:

Change you may seeWhat your client should do
New response fieldsIgnore them.
New enum values in responsesHandle an unknown value without failing.
New error codesAct on the HTTP status.
New event types and frame fieldsSkip what you do not know.
New optional request fieldsNothing: you are not required to send them.

Do not depend on the order of fields, on the error text, or on the order of list results unless the operation says so.

Next steps