Skip to main content
POST
Create an organization policy api token

Authorizations

Authorization
string
header
required

JWT tokens should be used with OIDC account (human to machine). JWT tokens used by the Qovery console to communicate with the API have a TTL. Curl Example ' curl https://console.qovery.com/organization -H "Authorization: Bearer $qovery_token" '

Path Parameters

organizationId
string<uuid>
required

Organization ID

Body

application/json
name
string
required
opa_policy
string
required

Open Policy Agent (rego) rule definitions, without a package declaration: Qovery prepends a per-token package so that one token's rules cannot authorize another's. The policy must define an allow rule, and the request is denied unless it evaluates to true.

description
string
role_id
string<uuid> | null

the roleId provided by the "List organization custom roles" endpoint. The role bounds what the token may do once its policy has allowed a request, so effective access is the intersection of the two. Omit it, or send null, for organization-admin.

expires_at
string<date-time> | null

Response

Organization policy api token created

id
string<uuid>
required
read-only
created_at
string<date-time>
required
read-only
updated_at
string<date-time>
read-only
name
string
description
string
role_name
string
role_id
string<uuid>

the organization role this token acts as once its policy has allowed a request. Effective access is the intersection of this role and its policy.

token
string

the generated token to send in 'Authorization' header prefixed by 'Token '. It is returned only here and cannot be retrieved afterwards.

creator_name
string | null
user_sub
string
expires_at
string<date-time> | null