Management API reference
Every operation under https://app.endpointblank.com/api/v1, drawn from the same
OpenAPI document
you can load into your own tools. Authenticate with a management API key as Authorization: Bearer epb_mk_...; the
guide
covers keys, paging, retries and rate limits.
Organization
GET
/organization
The organization this key belongs to
Responses
-
200The organization and the key used -
401Missing, invalid or revoked key -
429Rate limited
API packages
GET
/api_packages
List API packages
Parameters
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of API packages -
400Invalid pagination -
401Missing, invalid or revoked key -
429Rate limited
POST
/api_packages
Create an API package
Parameters
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
name
required
|
string |
Responses
-
201The API package -
401Missing, invalid or revoked key -
403Read-only key -
422Invalid fields, or the name is taken -
429Rate limited
GET
/api_packages/{id}
Get an API package
Parameters
id
required
|
uuid (path) |
Responses
-
200The API package -
401Missing, invalid or revoked key -
404Not found -
429Rate limited
PATCH
/api_packages/{id}
Rename an API package
Parameters
id
required
|
uuid (path) |
JSON body
name
required
|
string |
Responses
-
200The API package -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
422Invalid fields, or the name is taken -
429Rate limited
DELETE
/api_packages/{id}
Delete an API package
Refused with api_package_assigned while a client holds it.
Parameters
id
required
|
uuid (path) |
Responses
-
200Deleted -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
422The package is assigned to clients -
429Rate limited
GET
/api_packages/{id}/endpoints
List what an API package publishes
Parameters
id
required
|
uuid (path) | |
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of the package's endpoints -
400Invalid pagination -
401Missing, invalid or revoked key -
404Package not found -
429Rate limited
POST
/api_packages/{id}/endpoints
Add an endpoint to an API package
Derives the grants of every client holding the package and pushes them to the provider's intake.
Parameters
id
required
|
uuid (path) | |
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
application_id
required
|
uuid | |
environment_id
required
|
uuid | |
endpoint_id
|
uuid or null | Omit or null for every endpoint of the application. |
Responses
-
201The endpoint was added -
401Missing, invalid or revoked key -
403Read-only key -
404Package not found -
422Invalid fields, an id that does not exist, or already in the package -
429Rate limited
DELETE
/api_packages/{id}/endpoints/{access_id}
Remove an endpoint from an API package
Revokes every client grant the entry was the only reason for, on the provider's intake.
Parameters
id
required
|
uuid (path) | |
access_id
required
|
uuid (path) |
Responses
-
200Deleted -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
429Rate limited
Endpoints
GET
/endpoints
List the organization's endpoints
Parameters
application_id
|
uuid (query) | Only this application's endpoints. |
version
|
string (query) | Only endpoints deployed in an application version of this name. Without application_id this matches the name in every application of the organization; combine it with application_id for one application's version. |
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of endpoints -
400Invalid pagination -
401Missing, invalid or revoked key -
422application_id is not a UUID, or version is not a string -
429Rate limited
Applications
GET
/applications
List applications
Parameters
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of applications -
400Invalid pagination -
401Missing, invalid or revoked key -
429Rate limited
POST
/applications
Create an application
Places the application in each environment given a base URL; at least one is required.
Parameters
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
environment_base_urls
required
|
object | Environment id to base URL, e.g. https://api.example.com |
name
required
|
string | |
organization_group_id
|
uuid | |
public
|
boolean |
Responses
-
201The created application -
401Missing, invalid or revoked key -
403Read-only key -
422Invalid fields, or intake refused the application -
429Rate limited
GET
/applications/{application_id}/environments
List the environments an application runs in
Parameters
application_id
required
|
string (path) | |
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of application environments -
400Invalid pagination -
401Missing, invalid or revoked key -
404Not found -
429Rate limited
POST
/applications/{application_id}/environments
Place an application in an environment at a base URL
Parameters
application_id
required
|
string (path) | |
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
base_url
required
|
string | |
environment_id
required
|
uuid |
Responses
-
201The application environment -
401Missing, invalid or revoked key -
403Read-only key -
404Application not found -
422Invalid fields, or intake refused the environment -
429Rate limited
DELETE
/applications/{application_id}/environments/{id}
Remove an application from an environment
Refused (has_dependents) while access grants on the application in that environment, or credentials bound to it, depend on it.
Parameters
application_id
required
|
string (path) | |
id
required
|
string (path) |
Responses
-
200The application left the environment -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
422Still in use, or intake refused the removal -
429Rate limited
GET
/applications/{id}
Get an application
Parameters
id
required
|
string (path) |
Responses
-
200The application -
401Missing, invalid or revoked key -
404Not found -
429Rate limited
PATCH
/applications/{id}
Rename an application or change whether it is public
Parameters
id
required
|
string (path) |
JSON body
name
|
string | |
public
|
boolean |
Responses
-
200The updated application -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
422Invalid fields, or intake refused the change -
429Rate limited
DELETE
/applications/{id}
Delete an application
Refused (has_dependents) while access grants or credentials depend on it.
Parameters
id
required
|
string (path) |
Responses
-
200The application was deleted -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
422Still in use, or intake refused the delete -
429Rate limited
Environments
GET
/environments
List environments
Parameters
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of environments -
400Invalid pagination -
401Missing, invalid or revoked key -
429Rate limited
POST
/environments
Create an environment
Parameters
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
domain
required
|
string | |
name
required
|
string | |
is_default
|
boolean |
Responses
-
201The created environment -
401Missing, invalid or revoked key -
403Read-only key -
422Invalid fields, or intake refused the environment -
429Rate limited
GET
/environments/{id}
Get an environment
Parameters
id
required
|
string (path) |
Responses
-
200The environment -
401Missing, invalid or revoked key -
404Not found -
429Rate limited
PATCH
/environments/{id}
Update an environment
The production environment can't be changed (protected).
Parameters
id
required
|
string (path) |
JSON body
domain
|
string | |
is_default
|
boolean | |
name
|
string |
Responses
-
200The updated environment -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
422Invalid fields, protected, or intake refused the change -
429Rate limited
DELETE
/environments/{id}
Delete an environment
Refused while access grants are scoped to it or credentials are bound to an application in it. The production environment can't be deleted.
Parameters
id
required
|
string (path) |
Responses
-
200The environment was deleted -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
422Protected, still in use, or intake refused the delete -
429Rate limited
Credentials
GET
/credentials
List runtime client credentials (metadata only, never a secret)
Parameters
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
application_environment_id
|
uuid (query) | Only credentials for this application environment. An id that is not a UUID matches nothing and answers an empty page, not 400. |
Responses
-
200A page of credentials and the next cursor -
400Invalid pagination -
401Missing, invalid or revoked key -
429Rate limited
POST
/credentials
Issue a credential for one of your application environments
The secret is in this answer and nowhere else. It is never stored for Idempotency-Key replay: a retry with the same key answers 409 idempotency_replay_unavailable instead, with the credential's location header. An error answer holds no secret and is replayed as usual.
Parameters
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
application_environment_id
required
|
uuid |
Responses
-
201The credential, with client_secret shown once -
401Missing, invalid or revoked key -
403Read-only key -
404No such application environment in this organization -
409Idempotency-Key already used; the answer can't be replayed -
422Invalid fields, or intake refused the credential -
429Rate limited -
503Intake unreachable; nothing was created
GET
/credentials/{id}
A runtime client credential (metadata only)
Parameters
id
required
|
uuid (path) |
Responses
-
200The credential -
401Missing, invalid or revoked key -
404Not found -
429Rate limited
DELETE
/credentials/{id}
Revoke a credential
Removes it from intake, then deletes it. Its current and previous secrets stop authenticating.
Parameters
id
required
|
uuid (path) |
Responses
-
200Revoked -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
409An intake's own credential (intake_credential); nothing was revoked -
422Intake refused the delete (intake_rejected; the revoke is queued, and the credential stops authenticating once intake takes it. It is still listed here until a retried DELETE succeeds.), or intake revoked it but the record could not be removed here (delete_refused; retry the DELETE) -
429Rate limited -
503Intake was not reached; the revoke is queued, and the credential stops authenticating once intake takes it. It is still listed here until a retried DELETE succeeds.
POST
/credentials/{id}/rotate
Issue a new secret; the old one works for the grace window
The secret is in this answer and nowhere else. It is never stored for Idempotency-Key replay: a retry with the same key answers 409 idempotency_replay_unavailable instead, with the credential's location header. An error answer holds no secret and is replayed as usual. Only one previous secret is kept: rotating again ends the earlier secret's grace window immediately, so recover a lost answer by reading the credential, not by rotating again. Concurrent rotations of one credential race: only one of the secrets returned will work.
Parameters
id
required
|
uuid (path) | |
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
Responses
-
200The credential, with the new client_secret shown once -
401Missing, invalid or revoked key -
403Read-only key -
404Not found -
409Idempotency-Key already used; the answer can't be replayed (idempotency_replay_unavailable), or an intake's own credential (intake_credential); nothing was rotated -
422Intake refused the new secret -
429Rate limited -
503Intake unreachable; the secret was not rotated
Client packages
GET
/clients/{client_id}/packages
List the API packages a client holds
For a client that has not accepted its invite, the packages set up for it to get when it does (status pending).
Parameters
client_id
required
|
uuid (path) | A client's id (from GET /clients). |
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of assignments -
400Invalid pagination -
401Missing, invalid or revoked key -
404No such client -
429Rate limited
POST
/clients/{client_id}/packages
Assign an API package to a client
Grants the client every endpoint the package publishes in environment_id, pushed to your intake. For a client that has not accepted its invite, sets the package up (status pending) to be assigned, and pushed, the moment it accepts; one that cannot be assigned then is kept as status refused with the reason, and your administrators are emailed. Refused (422) when the client already holds or is set up for the package (already_assigned) or the package publishes nothing in that environment (nothing_published_in_environment).
Parameters
client_id
required
|
uuid (path) | A client's id (from GET /clients). |
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
api_package_id
required
|
uuid | |
environment_id
required
|
uuid |
Responses
-
201The assignment -
401Missing, invalid or revoked key -
403The key is read-only -
404No such client -
422Refused: environment_not_found, api_package_not_found, already_assigned, nothing_published_in_environment or validation_failed -
429Rate limited
PATCH
/clients/{client_id}/packages/{id}
Change the environment a client holds an API package in
Re-derives the client's grants from the package in the new environment, or moves a pending one. Refused (422) with nothing_published_in_environment when the package publishes nothing there, or (client_accepted) when the client accepted while this was sent.
Parameters
client_id
required
|
uuid (path) | A client's id (from GET /clients). |
id
required
|
uuid (path) | A package assignment's id. |
JSON body
environment_id
required
|
uuid |
Responses
-
200The assignment -
401Missing, invalid or revoked key -
403The key is read-only -
404Not found -
422Refused: environment_not_found, nothing_published_in_environment, client_accepted (a pending assignment, and the client accepted while this was sent) or validation_failed -
429Rate limited
DELETE
/clients/{client_id}/packages/{id}
Un-assign an API package from a client
Revokes every grant the package was the client's last reason for. A grant also granted directly or by another package stays. Drops a pending one, or dismisses one refused on accept.
Parameters
client_id
required
|
uuid (path) | A client's id (from GET /clients). |
id
required
|
uuid (path) | A package assignment's id. |
Responses
-
200The package was un-assigned -
401Missing, invalid or revoked key -
403The key is read-only -
404Not found -
422Refused: client_accepted (a pending assignment, and the client accepted while this was sent, so it is being applied) -
429Rate limited
Client grants
GET
/clients/{client_id}/grants
List the grants a client holds directly
Grants derived from API packages are not listed here unless they were also granted directly. For a client that has not accepted its invite, the grants set up for it to get when it does (status pending).
Parameters
client_id
required
|
uuid (path) | A client's id (from GET /clients). |
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of direct grants -
400Invalid pagination -
401Missing, invalid or revoked key -
404No such client -
429Rate limited
POST
/clients/{client_id}/grants
Grant a client access to an application or endpoint
Grants the whole client organization access to one endpoint of your application, or to every endpoint when target_endpoint_id is omitted, in one environment the application is deployed to. Pushed to your intake. For a client that has not accepted its invite, sets the grant up (status pending) to be made, and pushed, the moment it accepts; one that cannot be made then is kept as status refused with the reason, and your administrators are emailed.
Parameters
client_id
required
|
uuid (path) | A client's id (from GET /clients). |
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
environment_id
required
|
uuid | |
target_application_id
required
|
uuid | |
target_endpoint_id
|
uuid or null |
Responses
-
201The grant -
401Missing, invalid or revoked key -
403The key is read-only -
404No such client -
409grant_revoked_concurrently: the grant was made, then revoked by another request before it could be returned -
422Refused: application_not_found, endpoint_not_found, environment_not_in_application, already_granted or validation_failed -
429Rate limited
DELETE
/clients/{client_id}/grants/{id}
Revoke a client's direct grant
Revokes the grant unless an API package the client holds also derives it; still_granted_by_package then says the client keeps it through the package. Drops a pending one, or dismisses one refused on accept.
Parameters
client_id
required
|
uuid (path) | A client's id (from GET /clients). |
id
required
|
uuid (path) | A direct grant's id. |
Responses
-
200The direct grant was removed -
401Missing, invalid or revoked key -
403The key is read-only -
404Not found -
422Refused: client_accepted (a pending grant, and the client accepted while this was sent, so it is being applied) -
429Rate limited
Clients
GET
/clients
List clients (client invites, pending and accepted)
Parameters
limit
|
integer (query) | |
after
|
string (query) | The next_cursor from the previous page. |
Responses
-
200A page of clients -
400Invalid pagination -
401Missing, invalid or revoked key -
429Rate limited
POST
/clients
Invite a client
Creates a client invite, as the portal's Invite Client form does. Counts against the plan's client limit. Without email, share the returned invite_code with the client; it accepts the invite from its own EndPointBlank organization. With email, the invite is for that address: an administrator of the client's organization whose confirmed email it is accepts it in EndPointBlank, and signup_url (in this answer only) is a link you send them yourself, since EndPointBlank sends no invite email. Signing up from it links their new organization. The answer is the same whether or not the address has an account. packages and grants set up what the client gets when it accepts: they are assigned and granted, and pushed to your intake, as soon as it does, with nothing more for you to do. Each is checked as POST /clients/{client_id}/packages and /grants check it, and a refused one refuses the whole request.
Parameters
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
JSON body
name
required
|
string | |
contacts
|
array of object | Your contacts to share with the client. An existing contact with the same email (in any case) is reused. Listing one email twice is refused with invalid_contacts. |
contacts[].email
required
|
string | |
contacts[].first_name
required
|
string | |
contacts[].last_name
required
|
string | |
contacts[].id
|
uuid | |
contacts[].phone_number
|
string or null | |
contacts[].title
|
string or null | |
email
|
email or null | Invite by email address instead of a code. At most one unanswered invite per address (already_invited), and a daily limit (invite_rate_limited). The sign-up link works for 14 days. |
grants
|
array of object | Direct grants to make when the client accepts. |
grants[].environment_id
required
|
uuid | |
grants[].target_application_id
required
|
uuid | |
grants[].target_endpoint_id
|
uuid or null | |
packages
|
array of object | API packages to assign when the client accepts. |
packages[].api_package_id
required
|
uuid | |
packages[].environment_id
required
|
uuid |
Responses
-
201The new client -
401Missing, invalid or revoked key -
402The plan's client limit is reached -
403The key is read-only -
409already_invited: the address has an invite from you nobody has answered; or idempotency_replay_unavailable on a retry of an email invite, whose signup_url is not replayed -
422Refused: validation_failed (a blank name, an invalid contact or an invalid grant), invalid_contacts (contacts is not a list of objects, or lists one email twice), invalid_packages or invalid_grants (not a list of objects), managed_clients_removed (managed or owner_email sent), or a package or grant refusal (see the error code) -
429invite_rate_limited: the day's email invites are used up; Retry-After says when the next one can be made
DELETE
/clients/{client_id}/invite
Revoke a client's invite
Revokes an invite the client has not accepted, code or email, pending, declined or expired. The invite is deleted with anything set up for it to get on accept, and its sign-up link stops working. Safe to retry: a revoked invite answers 404. An accepted client is removed with DELETE /clients/{id}.
Parameters
client_id
required
|
uuid (path) | A client's id. |
Responses
-
200The invite was revoked -
401Missing, invalid or revoked key -
403The key is read-only -
404Not found -
422invite_accepted: the client has accepted; remove it with DELETE /clients/{id} instead -
429Rate limited
POST
/clients/{client_id}/invite/link
Make a new sign-up link for an email invite
For an email invite nobody has answered, expired or not: a new signup_url, in this answer only, valid for 14 days. The old link stops working. EndPointBlank sends nothing; send the link yourself.
Parameters
client_id
required
|
uuid (path) | A client's id. |
Idempotency-Key
|
string (header) | Retrying a POST with the same key replays the first answer. |
Responses
-
200The client -
401Missing, invalid or revoked key -
403The key is read-only -
404Not found -
409idempotency_replay_unavailable on a retry with the same key -
422not_an_email_invite (a code invite, or an invite to an existing account, which has no link) or invite_not_open (accepted or declined) -
429Rate limited
GET
/clients/{id}
Get a client
Parameters
id
required
|
uuid (path) | A client's id. |
Responses
-
200The client -
401Missing, invalid or revoked key -
404Not found -
429Rate limited
DELETE
/clients/{id}
Remove a client
Deletes the invite. When it was your last accepted invite for that client organization, also un-assigns every API package the client holds from you and revokes every grant those packages and direct grants gave it; while another accepted invite links you to the same organization, its packages and grants stay. The revoke is run again a few minutes later, so an assignment or grant made while it ran is taken away too. Safe to retry: a client already removed answers 404 and nothing changes. Anything set up for a pending invite to get on accept is deleted with it.
Parameters
id
required
|
uuid (path) | A client's id. |
Responses
-
200The client was removed -
401Missing, invalid or revoked key -
403The key is read-only -
404Not found -
429Rate limited
Error codes
Every error is {"error": {"code", "message", "details"}}.
Match on code; message
is for people and may change. Send Accept: application/json
so errors raised before routing also come back as JSON.
Authentication and limits
missing_key |
401 | No Authorization: Bearer header was sent. |
invalid_key |
401 | The key is unknown, revoked or malformed. |
runtime_credential_refused |
401 | Basic runtime credentials were sent. Send a management API key (epb_mk_...) as a Bearer token. |
insufficient_scope |
403 | The key is read-only and the request writes. |
audit_unavailable |
503 | The write could not be recorded in the audit log, so it was not made. Retry. |
rate_limited |
429 | Too many requests. Wait for the Retry-After header's seconds. |
plan_limit |
402 | Your plan's limit for this resource is reached. |
Requests
validation_failed |
422 | One or more fields are invalid. details lists them by field. |
not_found |
404 | No such resource in your organization, or no such /api/v1 path. Another organization's id answers this too. |
invalid_pagination |
400 | limit is not 1-100, or after is not a next_cursor from an earlier page. |
invalid_filter |
422 | A list filter has the wrong type, such as a non-UUID id. |
invalid_idempotency_key |
400 | The Idempotency-Key header is empty or longer than 255 characters. |
idempotency_key_reused |
422 | The Idempotency-Key was already used for a different request. |
idempotency_request_in_progress |
409 | The first request with this Idempotency-Key is still running. Retry shortly. |
idempotency_replay_unavailable |
409 | The first answer for this Idempotency-Key held a secret shown only once, so it can't be replayed. Read the resource instead. |
bad_request |
400 | The request could not be read, such as a body that isn't valid JSON. Raised before routing. |
internal_server_error |
500 | Something failed on our side. Safe to retry a GET. |
Applications, environments and API packages
has_dependents |
422 | The application or environment still has grants or credentials. Remove them first. |
protected |
422 | The production environment can't be changed or deleted. |
invalid_environment_base_urls |
422 | environment_base_urls must map environment ids to base URLs. |
api_package_assigned |
422 | The API package is still assigned to clients. Remove its assignments first. |
intake_sync_failed |
422 | Intake would not take the change, so nothing was changed. message says why. |
Credentials
delete_refused |
422 | Intake revoked the credential but its record could not be removed here. Retry the DELETE. |
intake_credential |
409 | The credential belongs to an intake and can't be rotated or revoked here. |
intake_rejected |
422 | On a credential: intake refused the change, so nothing was changed. |
intake_unavailable |
503 | Intake could not be reached or failed. Nothing was changed. Retry. |
Clients, packages and grants
invalid_contacts |
422 | contacts must be a list of objects with email, first_name and last_name, each email once. |
invalid_packages |
422 | packages must be a list of objects with api_package_id and environment_id. |
invalid_grants |
422 | grants must be a list of objects with target_application_id and environment_id. |
managed_clients_removed |
422 | Managed clients were removed: a create that sends managed or owner_email is refused. |
already_invited |
409 | That address already has an invite from you that nobody has answered. Make a new link or revoke it. |
invite_rate_limited |
429 | The organization has created as many email invites as it can in a day. Try again later. |
not_an_email_invite |
422 | The client was invited with a code, or to an EndPointBlank account it already has, so it has no sign-up link. |
invite_not_open |
422 | The email invite was accepted or declined, so it has no sign-up link. |
invite_accepted |
422 | The client accepted its invite, so there is nothing to revoke. Remove the client instead. |
client_not_accepted |
422 | The client hasn't accepted its invite yet, so nothing can be assigned or granted. |
client_accepted |
422 | The client just accepted its invite and its setup is being applied. Nothing was changed. |
api_package_not_found |
422 | api_package_id is not one of your API packages. |
environment_not_found |
422 | environment_id is not one of your environments. |
already_assigned |
422 | The client already holds that API package. Change its environment with PATCH. |
nothing_published_in_environment |
422 | The package would give the client no grants in that environment. details lists why. |
application_not_found |
422 | target_application_id is not one of your applications. |
endpoint_not_found |
422 | target_endpoint_id is not an endpoint of target_application_id. |
environment_not_in_application |
422 | environment_id is not one of the target application's environments. |
already_granted |
422 | The client already holds that grant directly. |
grant_revoked_concurrently |
409 | The grant was made, then revoked by another request. List the client's grants to see where it stands. |