Skip to content
View source specification ↗
POST /secrets

Create a secret, which is a special type of data that is secured. Secrets are special data that can be very dangerous to use, and so is put in a special database.

Some well known types of secrets include: Random secret data, access tokens, passwords, and various others.

Generic secrets

If you want to keep something secret, and have it super safe, you can create a secret. This secret is stored in portos with a unique resource identifier for a storage document.

For example, maybe you have client credentials or something that is a generic json blob.

i.e. https://api.portoperatingsystem.com/storage/secrets/portos1.secret.<UUID>

Tokens

A specialized type of secret is a OAUTH token secret. This secret is often used to access plugins, so there are specialized indexes to make token look up faster.

Requires a signed user/session or the existing authenticated client flow. The anonymous DCR delegated device profile cannot invoke this operation.

Required scope

Any authenticated access token

Request body

Fields

secretOauthTokenSecret | OauthClientCredentialSecret | ApplePushNotificationAuthTokenSecret | PersonalAccessTokenSecret | CustomPluginSecret | ApiKeySecretRequired

discriminator: type

Returns

200

Secret created successfully

Fields

idstringRequired

The created secret ID

Errors

400

Invalid request payload

Check the request fields and any validation details, then correct the payload.

500

Internal server error

Retry with backoff only when the operation is safe to repeat. Include the error code when reporting persistent failures.