Keys

Issue, list, rotate, and revoke the integration and embed keys a project accepts.

dev · https://api.dev.oprag.ai

All 5 endpoints on this page require a Cognito JWT from a signed-in dashboard session. An integration key returns 401 on every one of them — see what an API key can reach.

GET /v1/keys

Every API key in the workspace, across all its projects.

Auth Cognito JWT admin

Before you call it

  • Keys are returned by prefix only — the secret itself is never readable after creation.

Path parameters

None.

Query parameters

Name Type Required Default Description
projectId string Optional Only keys belonging to this project.
environment "live" | "test" Optional Only keys for this environment. Unrecognised values match nothing.
status "active" | "revoked" Optional Only keys in this state. Unrecognised values match nothing.

Body parameters

None.GET requests carry no body.

Response

Status codes

Status Meaning
200 Success.
401 Missing or expired JWT.
403 The signed-in user's role does not allow this.
429 Rate limited. See rate limits.

curl

Shell
curl -X GET 'https://api.dev.oprag.ai/v1/keys' \
  -H 'Authorization: Bearer <Cognito JWT>'
GET /v1/projects/{projectId}/keys

List API keys (prefix only)

Auth Cognito JWT admin

Path parameters

Name Type Required Description
projectId string Required Project the request applies to. Must belong to the calling workspace.

Query parameters

None.Neither paginated nor filtered from the query string.

Body parameters

None.GET requests carry no body.

Response

Status codes

Status Meaning
200 Success.
401 Missing or expired JWT.
403 The signed-in user's role does not allow this.
404 No such resource in this workspace.
429 Rate limited. See rate limits.

curl

Shell
curl -X GET 'https://api.dev.oprag.ai/v1/projects/{projectId}/keys' \
  -H 'Authorization: Bearer <Cognito JWT>'
POST /v1/projects/{projectId}/keys

Create an additional API key for the project.

Auth Cognito JWT admin

Before you call it

  • The key secret is shown once, in this response, and is never readable again.

Path parameters

Name Type Required Description
projectId string Required Project the request applies to. Must belong to the calling workspace.

Query parameters

None.Everything it needs is in the request body.

Body parameters

Name Type Required Description
environment "live" | "test" Optional live or test. Test keys answer from a fixture and never touch documents.
label string Optional Human-readable label, shown in the dashboard.

Response

Status codes

Status Meaning
201 Created.
400 The request body failed validation.
401 Missing or expired JWT.
403 The signed-in user's role does not allow this.
404 No such resource in this workspace.
429 Rate limited. See rate limits.

curl

Shell
curl -X POST 'https://api.dev.oprag.ai/v1/projects/{projectId}/keys' \
  -H 'Authorization: Bearer <Cognito JWT>'
POST /v1/projects/{projectId}/keys/rotate

Rotate integration + embed key pair; revoke all prior keys

Auth Cognito JWT admin

Path parameters

Name Type Required Description
projectId string Required Project the request applies to. Must belong to the calling workspace.

Query parameters

None.Acts on the resource named in the path; there is nothing to choose.

Body parameters

None.Rotates the project's keys; there is nothing to choose.

Response

Status codes

Status Meaning
200 Success.
400 The request body failed validation.
401 Missing or expired JWT.
403 The signed-in user's role does not allow this.
404 No such resource in this workspace.
429 Rate limited. See rate limits.

curl

Shell
curl -X POST 'https://api.dev.oprag.ai/v1/projects/{projectId}/keys/rotate' \
  -H 'Authorization: Bearer <Cognito JWT>'
DELETE /v1/projects/{projectId}/keys/{keyId}

Revoke key

Auth Cognito JWT admin

Path parameters

Name Type Required Description
projectId string Required Project the request applies to. Must belong to the calling workspace.
keyId string Required Key to act on.

Query parameters

None.Acts on the resource named in the path; there is nothing to choose.

Body parameters

None.DELETE requests carry no body.

Response

Status codes

Status Meaning
200 Success.
400 The request body failed validation.
401 Missing or expired JWT.
403 The signed-in user's role does not allow this.
404 No such resource in this workspace.
429 Rate limited. See rate limits.

curl

Shell
curl -X DELETE 'https://api.dev.oprag.ai/v1/projects/{projectId}/keys/{keyId}' \
  -H 'Authorization: Bearer <Cognito JWT>'

Ready to ship?

Get started free