Meretrix Dev / docs

Start

Quickstart

Create a key, call one endpoint and read the response. It takes about five minutes.

1. Create an API key

Open the client portal, go to Settings → API keys and create a key. Give it a name that says where it will be used, such as ci-deploy. The secret is shown once, so store it in your secrets manager straight away.

2. Make a request

Pass the key as a bearer token. This call lists the projects your key can see:

curl https://api.meretrixdev.com/v2/projects \
  -H "Authorization: Bearer $MERETRIX_API_KEY"

3. Read the response

{
  "data": [
    {
      "id": "prj_8f31c2",
      "name": "storefront",
      "created_at": "2026-03-11T08:12:44Z",
      "status": "active"
    }
  ],
  "next_cursor": null
}

When next_cursor is not null, pass it back as ?cursor= to fetch the next page.

4. Trigger a deployment

curl -X POST https://api.meretrixdev.com/v2/projects/prj_8f31c2/deployments \
  -H "Authorization: Bearer $MERETRIX_API_KEY" \
  -H "Idempotency-Key: 6b0d3f0e-2c6e-4a3c-9c55-1f0b8a2f6d11" \
  -H "Content-Type: application/json" \
  -d '{"ref": "main"}'

Send an idempotency key on every write. If the connection drops you can repeat the request with the same key and the deployment is created only once.

Errors

StatusCodeMeaning
400invalid_requestA parameter is missing or malformed.
401unauthorizedThe key is missing, revoked or wrong.
403forbiddenThe key does not have the required scope.
404not_foundThe resource does not exist or is not visible to this key.
429rate_limitedToo many requests. See Retry-After.