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
- application/json
Body
credential jsonrequired
The data for the credential you want to create.
userId stringrequired
The id of the currently logged in user
Responses
- 200
200
- application/json
- Schema
- Example (from schema)
- Result
Schema
success boolean
Default value: true
credentialId string
{
"success": true,
"credentialId": "63252d14cc29df15cc481a76"
}
{
"success": true,
"credentialId": "63252d14cc29df15cc481a76"
}
Loading...