Secrets

Issue and revoke organization secrets for CLI ingest.

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

All 3 endpoints on this page require a Cognito JWT from Architect. An organization secret returns 401 on every one.

POST /v1/organizations/me/secrets

Issue a new organization secret for CLI ingest.

Auth Cognito JWT admin+

Path parameters

None.

Query parameters

None.This endpoint does not read query parameters.

Body parameters

Name Type Required Description
environment "live" | "test" Optional Secret environment: live or test. Defaults to live.
label string Optional Human-readable label shown in Architect.

Request

JSON
{
  "environment": "live",
  "label": "Ash laptop"
}

Response

201 Success

JSON
{
  "secretId": "sec_abc123",
  "organizationId": "org_abc123",
  "secretPrefix": "sk_live_",
  "environment": "live",
  "status": "active",
  "label": "Ash laptop",
  "createdBy": "usr_xyz789",
  "createdAt": "2026-08-28T12:00:00.000Z",
  "secret": "sk_live_example_secret_shown_once"
}

Status codes

Status Meaning
201 Created.
400 Request body failed validation.
401 Missing or expired JWT.
403 Insufficient organization role.
429 Rate limited. See rate limits.
503 Service unavailable.

curl

Shell
curl -X POST 'https://api.dev.relay.oprag.ai/v1/organizations/me/secrets' \
  -H 'Authorization: Bearer <Cognito JWT>' \
  -H 'Content-Type: application/json' \
  -d '{"environment": "live","label": "Ash laptop"}'
GET /v1/organizations/me/secrets

List organization secrets (metadata only — no plaintext).

Auth Cognito JWT member+

Path parameters

None.

Query parameters

None.This endpoint does not read query parameters.

Body parameters

None.This endpoint does not read a request body.

Response

200 Success

JSON
{
  "secrets": [
    {
      "secretId": "sec_abc123",
      "organizationId": "org_abc123",
      "secretPrefix": "sk_live_",
      "environment": "live",
      "status": "active",
      "createdBy": "usr_xyz789",
      "createdAt": "2026-08-28T12:00:00.000Z"
    }
  ]
}

Status codes

Status Meaning
200 Success.
401 Missing or expired JWT.
403 Insufficient organization role.
429 Rate limited. See rate limits.
503 Service unavailable.

curl

Shell
curl -X GET 'https://api.dev.relay.oprag.ai/v1/organizations/me/secrets' \
  -H 'Authorization: Bearer <Cognito JWT>'
DELETE /v1/organizations/me/secrets/{secretId}

Revoke an organization secret.

Auth Cognito JWT admin+

Path parameters

Name Type Required Description
secretId string Required Organization secret id.

Query parameters

None.This endpoint does not read query parameters.

Body parameters

None.This endpoint does not read a request body.

Response

200 Success

JSON
{
  "secretId": "sec_abc123",
  "organizationId": "org_abc123",
  "secretPrefix": "sk_live_",
  "environment": "live",
  "status": "revoked",
  "createdBy": "usr_xyz789",
  "createdAt": "2026-08-28T12:00:00.000Z",
  "revokedAt": "2026-08-28T14:00:00.000Z"
}

Status codes

Status Meaning
200 Success.
400 Request body failed validation.
401 Missing or expired JWT.
403 Insufficient organization role.
404 Resource not found in this organization.
429 Rate limited. See rate limits.
503 Service unavailable.

curl

Shell
curl -X DELETE 'https://api.dev.relay.oprag.ai/v1/organizations/me/secrets/{secretId}' \
  -H 'Authorization: Bearer <Cognito JWT>'

Ready to ship?

Get started free