Skip to main content

Create a configuration service token

post/v1/secrets/configs/config/service_tokens

The token grants access to the secrets of a single configuration and is passed as Authorization: Bearer <token>. Access access: read (default) or write. The duration lifetime uses the Go format (24h, 720h); without it, the token never expires. The full token value is returned only in this response. The token is accepted only by configuration secret routes. Requires editor access to the environment.

Request​

Authorization

  • Authorizationstringheaderrequired

    Key in the format Bearer <API-key>. Create a key on the API keys page.

Query Parameters

  • project stringrequired

    Project alias

  • config stringrequired

    Configuration alias: <environment> is the root configuration, <environment>/<name> is a branch or a personal configuration (<environment>/personal), for example dev/local

Request body

    accessstring

    Access

    Possible values: [read, write]

    descriptionstring

    Description

    durationstring

    Lifetime

Response

    accessstring

    Access

    Possible values: [read, write]

    created_atstring<date-time>

    Creation date

    descriptionstring

    Description

    expire_atstring<date-time>

    Expiration date

    idinteger<int64>

    Identifier

    last_used_atstring<date-time>

    Last used date

    owner object

    Owner

    activeboolean

    Active flag

    avatar_urlstring

    Avatar

    Example: https://www.gravatar.com/avatar/00000000000000000000000000000000
    emailstring

    Email

    Example: jane@example.com
    idinteger<int64>

    Identifier

    Example: 42
    namestring

    Name

    Example: Jane Doe
    rolestring

    Role

    Possible values: [primary_owner, owner, admin, member]

    Example: member
    tokenstring

    Token

    typestring

    Type

    Possible values: [secrets]