Skip to main content
POST
/
credentials
/
packages
/
{packageName}
JavaScript
import Mobilerun from '@mobilerun/sdk';

const client = new Mobilerun({
  apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});

const credential = await client.credentials.packages.credentials.create('packageName', {
  credentialName: '26f1kl_-n-71',
  fields: [{ fieldType: 'email', value: 'x' }],
});

console.log(credential.data);
{
  "success": true,
  "message": "<string>",
  "data": {
    "userId": "<string>",
    "packageName": "<string>",
    "secretPath": "<string>",
    "credentialName": "<string>",
    "fields": [
      {
        "fieldType": "email",
        "value": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer token via Authorization header

Path Parameters

packageName
string
required

Body

application/json
credentialName
string
required
Required string length: 3 - 50
fields
object[]
required
Minimum array length: 1

Response

Credential created

success
enum<boolean>
required
Available options:
true,
false
message
string
required
data
object
required