Every request uses one header: Authorization: Bearer. For a credential, join its Access Key and Secret Key with a colon. Create credentials from the Credentials page in the console.
curl https://api.justdeploy.net/ping \
-H "Authorization: Bearer YOUR_ACCESS_KEY:YOUR_SECRET_KEY"The older X-Access-Key and X-Secret-Key headers still work, so an app already running on them keeps working and needs no new build. Use the single header for anything new.
"pong"JUSTDEPLOY_ACCESS_KEY and JUSTDEPLOY_SECRET_KEY before you build. Environment variables are baked into the image at build time. Always read them from process.env; never hardcode keys in your source.AI tools connected through MCP send the same header with a different token: a user-scoped one issued during the MCP sign-in, with no colon in it. Your MCP client handles this automatically, so there is nothing to create or paste, and the token covers every organization you belong to.
/organizationsLists the organizations the caller can access. Use it to verify your setup and get the organization ID the other endpoints need. Credential keys return their single organization with role null; a Bearer token returns every organization the user belongs to, with roles.
{
"organizations": [
{
"id": "org_...",
"name": "My Organization",
"role": null
}
]
}Every key carries a scope, and the API enforces it. Credentials you create in the console, and the one printed in DEPLOY.md, use deploy scope. Deploy-scope keys can use the full JustDeploy API for that organization. Keys issued for an app to use at runtime are deliberately narrower.
A runtime key is bound to the project it was issued for. Using it against a different project returns 403, even inside the same organization.
A deploy key printed in a project’s DEPLOY.md is bound to that project too: management calls against any other project return 403, while database, storage, and email stay organization-wide. The key from the organization DEPLOY.md remains organization-wide.
A project can also be restricted to managing members, a console setting on the project’s page. On such a project, creating a build, rebuilding, and redeploying return 403 with a message naming the managers, unless the caller is one of them. Roles carry no weight here: an organization-wide credential is always refused, whoever issued it, and a signed-in user or MCP token passes only if that user is picked, owner or not. Retrying with the same credential cannot succeed; use that project’s own DEPLOY.md, or act as a managing member. The setting itself can be changed by any member, but only in the console.
Requires a deploy-scope key or a Bearer token. Check the project’s environment variables first. If a key is already registered, reuse it rather than issuing another.
/organizations/:organizationId/projects/:projectId/credentialsIssues a runtime key bound to this project. The secret is returned only in this response, so register both values as project environment variables right away. A project can hold three runtime keys; past that the call returns 409 along with the existing keys. To free a slot, compare each one against the project’s JUSTDEPLOY_ACCESS_KEY: a key whose access does not match it is not in use, because environment variables are the only way the app receives a key. If more than one fails that comparison, every entry also carries lastUsedAt, so delete the least recently used first.
{
"credential": {
"id": 12,
"access": "ak_...",
"secret": "sk_...",
"description": "Runtime key for project prj_...",
"expiredAt": null,
"createdAt": "2026-07-27T00:00:00.000Z"
}
}/organizations/:organizationId/projects/:projectId/credentialsLists the project’s runtime keys. Secrets are never included.
/organizations/:organizationId/projects/:projectId/credentials/:credentialIdRevokes a runtime key immediately. Any app still using it starts getting 401, so replace the registered environment variables and rebuild first: variables are baked in while building, so the running app keeps the old key until then.