Skip to main content

Create Credential

POST 

/headless/credentials

Use this endpoint to add a credential programmatically via the API. This endpoint should be used primarily for non-OAuth blocks. If you are using Secrets Manager with an OAuth block and you have the OAuth tokens already, you can add them to Alloy with this endpoint. Please reference this section of our docs for a complete tutorial on when and how to use this endpoint.

Request

Header Parameters

    Authorization stringrequired

    Default value: bearer YOUR_API_KEY

Body

    credential jsonrequired

    The data for the credential you want to create.

    userId stringrequired

    The id of the currently logged in user

Responses

200

Schema

    success boolean

    Default value: true

    credentialId string
Loading...