conversionloopdevelopers

Requests and errors

The conventions every endpoint follows.

Requests

  • Base URL: https://api.conversionloop.net. All endpoints start with /v1.
  • Send request bodies as JSON with Content-Type: application/json.
  • Responses are JSON, except the CSV export.
  • Timestamps are ISO 8601 in UTC, for example 2026-12-03T09:12:44.120Z.

IDs

Every ID starts with a prefix that tells you what it is:

Prefix Object
prj_ Project
dfl_ Data field
aud_ Audience
cmp_ Campaign
prj_live_ Public key of a project (for the script tag, not for API paths)

Campaigns also have a slug and data fields a key. You choose those, and they are unique within a project. The script and audience rules refer to them.

Lists

List endpoints return an object with a data array:

{ "data": [ { "id": "cmp_9x2k4m7q1v8b3n6c5z0wd", "name": "…" } ] }

Lists are not paginated: they always return all items of the project.

Creating and changing

  • POST creates an object and answers 201 with it.
  • PATCH changes only the fields you send. Leave a field out to keep its value. Nested objects such as a campaign's content, appearance and delivery, or an audience's rules, are replaced as a whole.
  • DELETE answers 204 without a body. Projects and campaigns are archived, not deleted, so their responses remain available. Data fields and audiences are deleted.

When changes reach visitors

Campaign configurations are cached on the way to the browser. Changes to live campaigns, their audiences and project settings reach visitors within about five minutes. Visitors who are already on a page pick them up on their next page view.

Errors

Errors have an HTTP status and a body with a stable code:

{
  "error": {
    "code": "bad_request",
    "message": "Invalid campaign.",
    "details": [
      { "code": "too_small", "path": ["content", "options"], "message": "Too small: expected array to have >=2 items" }
    ]
  }
}

React to code and the status, not to message: the wording may change. For validation errors, details lists each issue with the path of the field.

Status Code Meaning
400 bad_request The request is malformed or fails validation. See details.
401 unauthorized No valid token. See Authentication.
403 forbidden The token lacks the scope for this endpoint.
404 not_found The object does not exist in your workspace, or the route does not exist.
409 conflict A data field key or campaign slug is already taken in the project.
422 unprocessable The request is valid but cannot be applied. Examples: a campaign cannot go live yet, an audience is still in use, or a reference points to nothing.
429 rate_limited Too many requests. See below.
500 internal_error Something went wrong on our side. Retry GET requests; before retrying a change, check whether it was applied.

Rate limits

The API allows 300 requests per minute per client IP address. Every response tells you where you stand:

Header Meaning
x-ratelimit-limit Requests allowed in the window
x-ratelimit-remaining Requests left in the current window
x-ratelimit-reset Seconds until the window resets
retry-after Only with 429: seconds to wait before retrying

When you get 429, wait for retry-after seconds before you try again.

Versioning

The version is part of the path (/v1). Within a version, we only make additive changes: new endpoints, new optional fields in requests, new fields in responses. Ignore fields you don't know, so your integration keeps working when we add some. Breaking changes would come as a new version.