Download the PHP package mencoro/mencoro-api-sdk without Composer

On this page you can find all versions of the php package mencoro/mencoro-api-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mencoro-api-sdk

Mencoro API SDKs

CI Release

Official clients for the Mencoro API — 86 operations over your projects, tracked queries, captures and the analytics computed from them.

Every client here is generated from the OpenAPI contract the API itself publishes, so they say what the running service does rather than what a handwritten wrapper remembers about it. One contract, one generator run, one version: a change to the API reaches all seven languages together.

Language Package Version Directory
Python 3.9+ mencoro PyPI python/
TypeScript (Node 22+, browsers) @mencoro/api npm typescript/
PHP 8.1+ mencoro/mencoro-api-sdk Packagist php/
Go 1.23+ github.com/mencoro/mencoro-api-sdk/go/v2 Go module go/
Java 11+ com.mencoro:mencoro-api Maven Central java/
.NET 8 Mencoro.Api NuGet csharp/
Ruby 3.0+ mencoro RubyGems ruby/

Each directory carries the generated reference for its language: one page per resource and one per model under its own docs/.

Get a key

Create one from your Mencoro account, under API keys in the user menu. The plaintext key is shown once, at creation, and never again — store it where you store any other secret. If you lose it, revoke it and issue another; revocation takes effect on the very next request.

A key carries capabilities and a set of organizations, and it only ever restricts. It never grants more than its owner's live membership and role already allow, and every request re-checks those: if your role is narrowed or your membership withdrawn, the key loses that access immediately, without being revoked and without being reissued.

Capability What it allows
read Every listing and every analytics operation. The floor — every key has it.
write Projects, tracked queries, clusters, competitors and discovery jobs.
organization:manage Members, invitations and the organization itself. Requested explicitly at creation.

First call

getMe returns the user the key belongs to, plus the key's capabilities and scope. It is the quickest way to confirm a key works and to see which organizations it reaches.

Python
TypeScript
Go
PHP
Ruby
Java
C#

Changes in 2.0.1

No API change. Maven Central rejected 2.0.0 because of the publishing plugin, so Java moves from 1.0.1 straight to 2.0.1. Every other language has both versions. The notes below still apply.

Changes in 2.0.0

Some code written for 1.0.1 breaks. Reading responses with Python, PHP, Java or Ruby needs no change:

The contract also gains, without breaking anything:

Conventions

These hold in every language. The per-language docs cover the signatures; this is what the contract cannot state about itself.

Errors

Every refusal answers the same envelope, and every one carries a requestId. Quote it to support and it identifies your exact request.

details is keyed by field, and each entry carries one of seven codes: missing_field, invalid_type, invalid_value, invalid_uuid, invalid_email, out_of_range, unknown_field. An unrecognised parameter is reported rather than ignored, so a typo in a filter never silently hands you the unfiltered set.

Rate limits

600 requests per user and 300 per key, every 60 seconds. The per-user ceiling is the real one: issuing more keys divides the same budget rather than adding to it.

Over budget answers 429 with a Retry-After header in seconds. Honour it:

Writes are idempotent

Every write requires an Idempotency-Key — 8 to 255 printable ASCII characters with no spaces, and a UUID is the obvious choice. Reuse it when you retry and the stored result is replayed rather than the operation running again, so a lost response never becomes a duplicate project or a second batch of tracked queries.

Generate the key outside the retry loop. A fresh key per attempt is the same as having no idempotency at all.

A key is scoped to the API key that used it and bound to the request it first answered — method, path and body. Reusing it for a different request is refused with idempotency_key_reused rather than answering the wrong operation.

Changes to the organization are confirmed

Archiving an organization, changing a member's role, inviting somebody — anything whose effects reach beyond your own data — takes two calls:

The token is single use, valid for five minutes, and bound to the effects the preview declared. If the organization changed in between, the call is refused with 409 rather than doing more than was agreed. Without the header it answers 428.

Paging

Listings take limit (default 20, maximum 100) and offset. A limit above the maximum is refused, never quietly clamped, so the page you asked for is the page you get. total counts everything the filter matches, not the size of the page.

Several listings also answer text/csv when asked for it with an Accept header. That is the same page of the same rows, encoded differently: the 100-row maximum applies unchanged, because it is a page and not a bulk export.

Dates

YYYY-MM-DD, covering whole days in UTC.

Also available over MCP

To read the same data inside an AI client rather than from your own code, the Mencoro MCP server exposes it to Claude, ChatGPT, Cursor and anything else that speaks MCP. Same data, no code to write.

Regenerating

Requires Docker; nothing else. Everything inside each language directory is generated and must not be edited by hand — the next run discards it. Adding a language is one entry in sdks.json.

The fetch is opt-in because a regeneration that silently pulls a new contract turns a mechanical rerun into a content change nobody reviewed, and the diff runs to six figures of lines across seven languages — the one place a surprise must not hide.

--sync writes the contract in the layout of the committed openapi.json — two-space indent, UTF-8 left unescaped, a trailing newline — so the diff it leaves is only what the contract changed. For today's contract that is byte for byte what jq . produces. It is written with Python's json module, which would differ from jq in two cases the contract does not contain: U+007F (DEL) is written raw where jq escapes it, and a number literal is rewritten in Python's form (1e3 becomes 1000.0, 1.50 becomes 1.5).

The generator never deletes a file it no longer emits, so after each language is generated the script deletes every file the previous .openapi-generator/FILES listed and the new one does not. Three kinds of listed path are kept, because their absence from the new list does not mean the contract dropped them:

Two corrections are applied by the generator script rather than by hand, because a hand edit would be discarded on the next run:

Contract

License

MIT. See LICENSE. Use of the Mencoro API itself is governed by Mencoro's terms.


All versions of mencoro-api-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mencoro/mencoro-api-sdk contains the following files

Loading the files please wait ...