Quickstart

Issue a key pair, confirm the service is up, then authenticate with those credentials.

1. Issue a project key pair

The first POST /v1/projects bootstraps the empty database and needs no credentials. The secret is returned only in this response.

curl https://accounts.zyneo.app/v1/projects \
  --header "Content-Type: application/json" \
  --data '{"name":"Tienda","environment":"test"}'

Expected response:

{
  "project_id": "proj_abc123",
  "api_key": "zyneo_key_test_a1b2c3d4e5f6",
  "secret": "zyneo_sk_test_z9y8x7w6v5u4",
  "key_prefix": "zyneo_key_test_a1b2c3d4e5f6",
  "environment": "test"
}

2. Check the service

curl https://accounts.zyneo.app/v1/health

Expected response:

{ "ok": true, "service": "zyneo-accounts" }

3. Send your credentials

Call GET /v1/projects/me with both credentials as request headers:

curl https://accounts.zyneo.app/v1/projects/me \
  --header "X-Zyneo-Key: zyneo_key_test_a1b2c3d4e5f6" \
  --header "Authorization: Bearer zyneo_sk_test_z9y8x7w6v5u4"

Expected response:

{
  "project_id": "proj_abc123",
  "key_prefix": "zyneo_key_test_a1b2c3d4e5f6",
  "environment": "test"
}

4. Read the result

FieldMeaning
project_id Stable identifier of your project.
key_prefix Display prefix of the API key used; helps you confirm which key called.
environment test or live, derived from the key prefix.

Credential values above are placeholders. Replace them with the pair issued to your project. The secret is shown once at creation — store it immediately.

Troubleshooting

A 401 response means a header is missing or a credential was rejected. See the error code table on Authentication.

Next step

Read Authentication before shipping.