Skip to main content
POST
https://production.methodfi.com
/
secrets
curl https://production.methodfi.com/secrets \
  -X POST \
  -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "pk_1234567890",
    "metadata": {
      "environment": "production"
    }
  }'
{
  "id": "sec_au22b1fbFrmfp",
  "metadata": {
    "environment": "production"
  },
  "created_at": "2025-12-04T18:50:54.024Z",
  "updated_at": "2025-12-04T18:50:54.024Z",
  "status": "active"
}
Creates a new Secret to securely store a sensitive value.

Body

Returns

Returns the newly created Secret object. Note that the value field is not returned in the response.
curl https://production.methodfi.com/secrets \
  -X POST \
  -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "pk_1234567890",
    "metadata": {
      "environment": "production"
    }
  }'
{
  "id": "sec_au22b1fbFrmfp",
  "metadata": {
    "environment": "production"
  },
  "created_at": "2025-12-04T18:50:54.024Z",
  "updated_at": "2025-12-04T18:50:54.024Z",
  "status": "active"
}