Nirmos
Providers

Create Credential

Create Credential — Nirmos Control Plane REST API.

POST
/v1/provider-credentials

Authorization

better-auth.session_token<token>

Production cookie uses __Secure- prefix.

In: cookie

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/provider-credentials" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "providerId": "string",    "credentialType": "api_key"  }'
{  "data": {    "id": "string",    "name": "string",    "providerId": "string",    "provider": {      "id": "string",      "name": "string",      "slug": "string"    },    "providerName": "string",    "providerSlug": "string",    "environmentId": "string",    "label": "string",    "config": {      "accountId": "string"    },    "credentialType": "string",    "keyPreview": "string",    "isDefault": true,    "status": "string",    "validationStatus": "string",    "validatedAt": "2019-08-24T14:15:22Z",    "version": 0,    "lastRotatedAt": "2019-08-24T14:15:22Z",    "lastUsedAt": "2019-08-24T14:15:22Z",    "usageCount": 0,    "expiresAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "requestId": "string"}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}